1.0.0 • Published 7 years ago
scx-test v1.0.0
build
initial project
npm init
add bin
then add bin
property in to package.json
, note that only you do this can you make your command in your terminal, type the key of bin, the js file will be proceed automatically.
"bin": {
"my-cli": "./index.js"
}
edit index.js
#!/usr/bin/env node
console.log("hello world");
1.0.0
7 years ago