init
npm init
package
version
| Code status | Stage | Rule | Example version |
|---|
| First release | New product | Start with 1.0.0 | 1.0.0 |
| Backward compatible bug fixes | Patch release | Increment the third digit | 1.0.1 |
| Backward compatible new features | Minor release | Increment the middle digit and reset last digit to zero | 1.1.0 |
| Changes that break backward compatibility | Major release | Increment the first digit and reset middle and last digits to zero | 2.0.0 |
description
{
"description": "A simple, practical and general-purpose React component library."
}
keywords
{
"keywords": [
"react",
"typescript"
],
}
homepage
{
"homepage": "https://github.com/gateisbug/practx-ui/tree/main"
}
bug
- 패키지에 문제가 있을 때 보고될 이슈 트래커 및 이메일 주소 등에 대한 URL 지정
{
"bugs": {
"url": "https://github.com/gateisbug/practx-ui/issues",
"email": "luftwaffe04@naver.com"
}
}
license
- 패키지 사용을 허용하는 방법과 제한 사항을 알 수 있도록 라이센스를 지정
{
"license": "(MIT or Apache-2.0)"
}
author
{
"author": "gateisbug <luftwaffe04@naver.com> (https://github.com/gateisbug)",
}
contributors
- 제작자가 여러 명일 경우 author 대신에 사용
{
"contributors": [
"Evan <evan@zillinks.com> ([https://zillinks.com](https://zillinks.com/))",
"Lewis <lewis@zillinks.com> ([https://zillinks.com](https://zillinks.com/))",
"Neo <neo@zillinks.com> ([https://zillinks.com](https://zillinks.com/))"
]
}
main
- 프로그램의 기본 진입 점(entry point)를 지정
- 패키지의 이름이
axios이고, 사용자가 require('axios') or import 'axios'를 사용하면 진입 점의 메인 모듈에서 exports object가 반환(return)됨
{
"main": "dist/index.cjs.js",
}
repository
- 코드가 존재하는 장소(주소)를 지정
npm docs 명령을 사용하여 패키지 저장소를 탐색 가능
{
"repository": "https://github.com/gateisbug/practx-ui.git",
}
publishing
versioning
npm version patch
npm version minor
npm version major
test
npm install ../practx-ui
publish
npm logout
npm login
npm whoami
npm publish
참고문헌