0
点赞
收藏
分享

微信扫一扫

node开发命令行脚本 / commander

1. 脚本第一行添加 #!/usr/bin/env node

// index.js
#!/usr/bin/env node
console.log('hello world')

2. package.json 添加bin

{
"name": "hello-test",
"version": "1.0.0",
"bin":{
"hello-cli":"index.js"
}
}

3. npm link

---------------------------------------------
生活的意义并不是与他人争高下,而在于享受努力实现目标的过程,结果是对自己行动的嘉奖。
↑面的话,越看越不痛快,应该这么说:

生活的意义就是你自己知道你要做什么,明确目标。没有目标,后面都是瞎扯!

新博客 ​​​https://www.VuejsDev.com​​ 用于梳理知识点



举报

相关推荐

0 条评论