@rocket-team/cli
cli是rocket-team前端通用开发组为组内开发提供的一套快速高效的脚手架指令集。
安装
Prerequisites: Node.js (>=6.x, 8.x preferred), npm version 3+ and Git.
npm i -g @rocket-team/cli
创建项目
rocket create <project-name>
示例
rocket create sample
一键创建页面
rocket createPage <page-name> -t <type>
示例
rocket createPage user // user = user/User
rocket createPage user-index // user = user/UserIndex
一键创建组件
rocket createComp <comp-name> -t <type>
示例
rocket createComp user // user = user/user
rocket createComp user/index
上传腾讯云cos
rocket upload -f <config-name> -v <version>
示例
rocket upload -f ./config.json -v 0.0.1
config.json
{
"uploadConf": {
"type": "qcloud",
"from": "/Users/qinmudi/work/vue-demo/dist/"
},
"cosConf": {
"app": {
"SecretId": "xxxxxxxxxxxxxxx",
"SecretKey": "xxxxxxxxxxxx"
},
"conf": {
"appId": "xxx",
"bucket": "xx",
"region": "ap-xxx",
"folder": "xxxxxxxxxxxx"
}
}
}