qiaopengbo-cli
v1.0.1
Published
<!-- @strongjoe/vuecli --> 查看知乎文章: https://zhuanlan.zhihu.com/p/147803930 npm 项目发布地址: https://www.npmjs.com/package/qiaopengbo-cli; npm publish faild 原因: https://www.jianshu.com/p/40f732d91a8c npm account: strongjoe email: [email protected]
Downloads
3
Readme
查看知乎文章: https://zhuanlan.zhihu.com/p/147803930 npm 项目发布地址: https://www.npmjs.com/package/qiaopengbo-cli; npm publish faild 原因: https://www.jianshu.com/p/40f732d91a8c npm account: strongjoe email: [email protected]
创建一个自己的 cli,
- npm init --y, 初始化一个package.json文件,
- 添加 bin; 【执行命令:对应的库】 "bin": { "qiaopengbo-cli": "./bin/qiaopengbo-cli" },
- 复制依赖到package.json文件 "dependencies": { "inquirer": "^4.0.0", "ora": "^1.3.0", "rimraf": "^2.6.2", "chalk": "^2.3.0", "commander": "^2.11.0", "download-git-repo": "^1.0.1" },
- 创建 bin目录和其下边的qiaopengbo-cli文件,在文件写入代码
npm install -g 全局安装依赖, 至此, qiaopengbo-cli构建完毕。
npm login 输入 npm网站的账户名和密码。登录
npm publish 将 qiaopengbo-cli 发布到npm上。
qiaopengbo-cli的使用 8.1 在本地目录 执行 npm install qiaopengbo-cli -g 安装cli 8.2 npm run qiaopengbo-cli