1.0.0 • Published 1 year ago
@iarth/spider v1.0.0
Your First CLI Program
First steps
#1 ADD bin to package.json
{
"name": "cli-test",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"bin": {
"cli-test": "index.js"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"clinei": "^0.0.2"
}
}
#2 ADD !/usr/bin/env node to index.js on top
#!/usr/bin/env node
//...
#3 publish to npm
Warn this is a publish public
package
npm publish --access public
#4 Install
npm install -g cli-test
#5 Run with clinei
cli-test help
Arth Friend, Enjoy with clinei 😊
1.0.0
1 year ago