- bin: will contain all executable .js files
- lib: contains other files which files of bin might use
- bin
- key of this field is command
- value is file to execute with that command which is
- main
- local import해서 쓰는 경우만 있으면 됨.
- Adding main makes our module both locally and globally usable.
- tells node that when somebody is trying to import this module locally like
- If main is missing, then node by default will try to pull index.js file from module’s root directory
- preferGlobal
- local import용으로도 쓴다면 셋팅할 필요 없음(default: false)
- true로 하고 local import해도 기능상 오작동이 생기는것은 아니며 경고문구가 뜸.
- npm install -g {local_dir_path}
- ex)
npm install -g ./
- ex)
- Commander.js
- node module which will help us parse process.argv in much easy and better way while
- parses process.argv and gives very easy interface to work with.
- Inquirer.js
- will help us design interactive CLI application.
- colors
- add some colors to console output
- pad
- output 메시지에 간격 추가