diff --git a/package.json b/package.json index 5199a6ba82..2064e3b99c 100644 --- a/package.json +++ b/package.json @@ -18,8 +18,9 @@ "postinstall": "patch-package", "prepare": "husky install", "-- DEV BUILD SCRIPTS": "-----------------------------------------------------------------------------------------------", + "clean": "rm -rf build api/build", "build-ddocs": "mkdir -p build/ddocs && cp -r ddocs/* build/ddocs/ && node scripts/build/cli setDdocsVersion && node scripts/build/cli setBuildInfo && node ./scripts/build/ddoc-compile.js primary && mkdir -p api/build/ddocs && cp build/ddocs/*.json api/build/ddocs/", - "build-dev": "./scripts/build/build-prepare.sh && npm run --prefix shared-libs/cht-datasource build && npm run build-webapp-dev && ./scripts/build/copy-static-files.sh", + "build-dev": "npm run clean && ./scripts/build/build-prepare.sh && npm run --prefix shared-libs/cht-datasource build && npm run build-webapp-dev && ./scripts/build/copy-static-files.sh", "build-dev-watch": "npm run build-dev && (npm run --prefix shared-libs/cht-datasource build-watch & npm run --prefix webapp build-watch & node ./scripts/build/watch.js)", "build-documentation": "./scripts/build/build-documentation.sh", "build-webapp-dev": "cd webapp && npm run build -- --configuration=development && npm run compile", diff --git a/scripts/build/build-prepare.sh b/scripts/build/build-prepare.sh index 65db17b3fb..f3b80ae113 100755 --- a/scripts/build/build-prepare.sh +++ b/scripts/build/build-prepare.sh @@ -2,10 +2,6 @@ set -e -echo "build-prepare: cleaning build directory" -rm -rf build -mkdir build - node scripts/build/cli npmCiModules echo "build-prepare: building ddocs"