to silence the warning from Angular 12.0 and up, which complains like:
Option "--prod" is deprecated: Use "--configuration production" instead
Signed-off-by: Kefu Chai <tchaikov@gmail.com>
. $TEMP_DIR/bin/activate
NG_CLI_ANALYTICS=false timeout 1h npm ci
echo "Building ceph-dashboard frontend with build:localize script";
- # we need to use "--" because so that "--prod" survives accross all
- # scripts redirections inside package.json
- npm run build:localize -- --prod
+ # we need to use "--" because so that "--configuration production"
+ # survives accross all scripts redirections inside package.json
+ npm run build:localize -- --configuration production
deactivate
cd $CURR_DIR
rm -rf $TEMP_DIR
npm cache clean --force
fi
npm ci
-FRONTEND_BUILD_OPTS='-- --prod'
+FRONTEND_BUILD_OPTS='-- --configuration production'
if [[ -n "${DEV_MODE}" ]]; then
FRONTEND_BUILD_OPTS+=' --deleteOutputPath=false --watch'
fi
set(frontend_dist_dir "${CMAKE_CURRENT_BINARY_DIR}/dist")
set(npm_args "--output-path ${frontend_dist_dir}")
if(NOT CMAKE_BUILD_TYPE STREQUAL Debug)
- string(APPEND npm_args " --prod --progress=false")
+ string(APPEND npm_args " --configuration=production --progress=false")
else()
string(APPEND npm_args " --progress=false")
endif()
fi
# Build
-npm run build -- --prod --progress=false || failed=true
+npm run build -- --configuration=production --progress=false || failed=true
# Unit Tests
npm run test:ci || failed=true