Last active
June 4, 2019 02:59
-
-
Save milomai/31574724311fc923258891c8bc7fb1a0 to your computer and use it in GitHub Desktop.
uni-app 生成原生 App 本地打包资源脚本
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 目前只支持 Mac OS X | |
| # 需要先安装 HBuilderX,并且能够正常从 HBuilderX 界面中导出本地打包资源。 | |
| # 使用方法: sh export_uni_app_native_resoures.sh /path/to/uni_app_project | |
| # 导出的资源在 /path/to/uni_app_project/unpackage/dist/build/app-plus | |
| PROJECT_PATH=`realpath ${1}` | |
| echo "工程路径: ${PROJECT_PATH}" | |
| EXPORT_PATH="${PROJECT_PATH}/unpackage/dist/build/app-plus" | |
| echo "导出到: ${EXPORT_PATH}" | |
| cd /Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli | |
| PATH='/usr/bin:/bin:/usr/sbin:/sbin:/Applications/HBuilderX.app/Contents/HBuilderX/plugins/node/node:/Applications/HBuilderX.app/Contents/HBuilderX/plugins/npm' \ | |
| UNI_INPUT_DIR=${PROJECT_PATH} \ | |
| UNI_OUTPUT_DIR=${EXPORT_PATH} \ | |
| UNI_PLATFORM='app-plus' \ | |
| '/Applications/HBuilderX.app/Contents/HBuilderX/plugins/node/node' \ | |
| '/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/bin/uniapp-cli.js' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment