npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@newbiz/social-libs

v0.1.0

Published

신사업개발실 원더FE개발팀 소셜 공유 라이브러리

Downloads

21

Readme

Social Libs

신사업개발실 원더FE개발팀 소셜 공유 라이브러리

This project was generated by Vessel.

About

공유하기 모듈: 카카오톡

Installation

해당 모듈을 사용할 프로젝트에서는 아래와 같이 설치한다.

$ npm install --save @newbiz/social-libs
or
$ yarn add @newbiz/social-libs

Usage

최초 랜더링 되는 앱에 아래와 같이 초기화를 실행해주고, 사용되는 컴포넌트에서 옵션 설정을 파라미터로 전달하면 된다.

ex)

import { KakaoShare } from '@newbiz/social-libs'

const kakaoShare = new KakaoShare("APP_JAVASCRIPT_KEY")

kakaoShare.createTextButton({ OPTIONS }) // 실행 할 메소드와 옵션

Modules

해당 모듈은 아래와 같은 라이브러리를 포함한다.

KakaoShare

Methods

카카오톡 공유 버튼 생성은 각 형태에 맞는 옵션을 지정하여 아래 메소드를 이용한다. 각 형태에 대한 option은 interface 정의를 참고한다.

Feed 형태 버튼 생성

public createFeedButton (options)

List 형태 버튼 생성

public createListButton (options)

Location 형태 버튼 생성

public createLocationButton (options)

Commerce 형태 버튼 생성

public createCommerceButton (options)

Text 형태 버튼 생성

public createTextButton (options)

URL Scrap 형태 버튼 생성

public createScrapButton (options)

커스텀 템플릿을 이용한 형태 버튼 생성

public createCustomButton (options)

Options

형태별 상세 옵션은 라이브러리내 interface 정의 파일을 참고. 공통 옵션 포함하여 위 메소드 형태와 동일한 옵션을 지정하여 option parameter를 메소드에 제공하면 된다.

interface IKakaoOption {
  // 공통
  container: string; // DOM Element 또는 Element의 ID Selector를 넘기면, 해당 Element를 클릭할 때 카카오링크가 전송됩니다.
  buttons?: [{ // 버튼, 링크 설정 가능
    title: string;
    link: IKakaoLinkUrl;
  }];
  isInstallTalk?: boolean; // 카카오톡이 설치되어 있지 않은 경우 마켓의 카카오톡 설치 페이지로 이동합니다.
  onSuccess? (message: object): void;
  onFailure? (): void;

  // feed, link, location, commerce, text, scrap, custom 타입별 옵션
  feed?: IKakaoFeedType;
  list?: IKakaoListType;
  location?: IKakaoLocationType;
  commerce?: IKakaoCommerceType;
  text?: IKakaoTextType;
  scrap?: IKakaoScrapType;
  custom?: IKakaoCustomType;
}

License

해당 프로젝트의 LICENSE 파일 참조.