0.3.0 • Published 6 months ago

global-library v0.3.0

Weekly downloads
-
License
ISC
Repository
bitbucket
Last release
6 months ago

Global-Library

Global Service에서 공통적으로 사용하는 코드들이 있는 라이브러리
cjs와 esm을 동시에 지원하도록 생성

install

$ # 배포된 최신 버전 install
$ npm i git+ssh://git@bitbucket.org:marketboro/global-library.git/latest

$ # 특정 버전 install
$ npm i git+ssh://git@bitbucket.org:marketboro/global-library.git/latest#0.2.3

$ # 특정 브랜치에 배포된 버전 install
$ npm i git+ssh://git@bitbucket.org:marketboro/global-library.git/latest#dev

how to make

  • /src 경로에서 코딩
  • npm run build로 트랜스파일
    • /cjs, /esm 경로에 각각 결과물 생성
  • 결과물이 생성됬을 떄 git push
    • 다른 프로젝트에선 이 결과물을 사용

! 주의점 !

  • 파일의 경로는 트랜스파일된 확장자까지 붙여주어야 esm에서도 사용 가능
    • 확장자를 안붙였을 때 esm에서 can not find module이 발생