CLI command line tool
How to create a package that can be used as cli (and package)?
Folder Structure
#!/usr/bin/env node require(__dirname+'/../dist/my-cli')
"files": [
"dist",
"bin"
],
"main": "./dist/index.js",
"bin": {
"my-cli": "./bin/my-cli"
},npm link # then start using the cli versionnpm version minor # update version npm pack # this will create the abc-1.0.0.tgz file # to install and use npm install -g abc-1.0.0.tgz
Useful Libs
Last updated
