#! /bin/bash

echo '执行 build.sh'
# 指定构建文件地址（webpack cli 参考文档：http://webpack.github.io/docs/cli.html）
echo ${BUILD_BUILDER_DIR}

echo ${BUILD_ARGV_STR}

webpack --config ${BUILD_BUILDER_DIR}/webpack/webpack.release.config.js --display-error-details --bail

# webpack-dev-server --config ${BUILD_BUILDER_DIR}/webpack.config.js # --display-error-details --bail

# if [ "$BUILD_ARGV_STR" = "nova:upload" ]; then
#     echo '执行 build.sh 上传图片'
#     # 启动图片上传
#     gulp images --gulpfile ${BUILD_BUILDER_DIR}/gulpfile.js --cwd $PWD
# elif [ "$BUILD_ARGV_STR" = "nova:build" ]; then
#     echo '执行 build.sh 构建项目'
#     # 启动构建
#     gulp build --gulpfile ${BUILD_BUILDER_DIR}/gulpfile.js --cwd $PWD
# elif [ "$BUILD_ARGV_STR" = "nova:watch" ]; then
#     echo '执行 build.sh 构建项目'
#     # 启动构建
#     gulp watch --gulpfile ${BUILD_BUILDER_DIR}/gulpfile.js --cwd $PWD
# else
#     echo '执行 build.sh 构建项目'
#     tnpm ii
#     # 启动构建
#     gulp build --gulpfile ${BUILD_BUILDER_DIR}/gulpfile.js --cwd $PWD
# fi
