HBuilderX有没有命令行功能做自动化构建?比如通过命令行发行?
飞翔的熊猫
- 发布:2019-10-22 10:25
- 更新:2020-02-01 10:13
- 阅读:2120
h***@haomo-studio.com - 热爱技术的企业家
首先全局安装cross-env:
npm install -g cross-env
然后在packages.json中配置以下两条命令来本地调试:
{
"scripts": {
"h5": "cd /Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/ && cross-env UNI_INPUT_DIR=$INIT_CWD/ UNI_OUTPUT_DIR=$INIT_CWD/unpackage/dist/dev/h5 UNI_PLATFORM=h5 NODE_ENV=development node bin/uniapp-cli.js",
"app": "cd /Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/ && cross-env UNI_INPUT_DIR=$INIT_CWD/ UNI_OUTPUT_DIR=$INIT_CWD/unpackage/dist/dev/app-plus UNI_PLATFORM=app-plus NODE_ENV=development node bin/uniapp-cli.js",
}
}
5***@qq.com
有基于Linux环境的么?
2021-09-29 13:47