n22-cli
v1.0.7
Published
#### 2.复制下列依赖到`package.json`dependencies ``` "dependencies": { "axios": "^0.19.0", "chalk": "^3.0.0", "clear": "^0.1.0", "commander": "^4.0.1", "consolidate": "^0.15.1", "download-git-repo": "^3.0.2", "figlet": "^1.2.4
Downloads
5
Readme
1.创建一个空项目使用npm init -y
初始化
2.复制下列依赖到package.json
dependencies
"dependencies": {
"axios": "^0.19.0",
"chalk": "^3.0.0",
"clear": "^0.1.0",
"commander": "^4.0.1",
"consolidate": "^0.15.1",
"download-git-repo": "^3.0.2",
"figlet": "^1.2.4",
"inquirer": "^7.0.1",
"metalsmith": "^2.3.0",
"ncp": "^2.0.0",
"ora": "^4.0.3",
"shelljs": "^0.8.3",
"update-notifier": "^4.0.0"
}
3.复制bin节点到package.json
"bin": {
"buildCli": "./bin/index.js"
},
4.安装依赖npm install
5.根目录创建bin目录,放置执行命令
6.执行npm link
或npm unlink
注册和反注册命令
7.发布npm
npm login --registry http://registry.npmjs.org
npm publish --registry http://registry.npmjs.org