TWIL 2021-3 (1)

jh22j9·2021년 4월 17일
0

1. Terminal Keybord Shortcut


control + R 최근 명령어 검색

🔗 The Best Keyboard Shortcuts for Bash (aka the Linux and macOS Terminal)

2. GitHub Packages에 패키지 발행하기


1. set up a new npm package

$ npm init
// package.json
{
  "name": "@my-org/test"
  "version": "0.1.0",
  "main": "index.js"
  ...
}
	

2. create .npmrc file at the root

// .npmrc
@my-org:registry=https://npm.pkg.github.com/

3. npm login

$ npm login --registry=https://npm.pkg.github.com

Password에는 깃허브에서 personal access token을 발급받아 입력한다.
토큰 생성 시 write:packages가 스콥에 포함되어야 한다.

4. bump the version number (추후 업데이트 시)

$ npm version patch -m "Upgrade to %s for reasons"

업데이트 내용에 따라 patch, minor, major 중 적합한 것을 사용한다.

💡 If the message config contains %s then that will be replaced with the resulting version number.

🔗 npm-version

5. publish

$ npm publish

패키지 발행 후 깃허브 레포에서 업데이트 확인

🔗 Configuring npm for use with GitHub Packages

0개의 댓글