@wii/cli
cli是wii前端通用开发组为组内开发提供的一套快速高效的脚手架指令集。
安装
Prerequisites: Node.js (>=6.x, 8.x preferred), npm version 3+ and Git.
npm i -g @wii/cli
创建项目
wii create <project-name>
示例
wii create sample
一键创建页面
wii createPage <page-name> -t <type>
示例
wii createPage user // user = user/User
wii createPage user-index // user = user/UserIndex
一键创建组件
wii createComp <comp-name> -t <type>
示例
wii createComp user // user = user/user
wii createComp user/index
上传腾讯云cos
wii upload -f <config-name> -v <version>
示例
wii 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"
}
}
}