- 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
- 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
- npm install -g {local_dir_path}
- ex)
npm install -g ./
- ex)