From b4ffa7671a1acf797b9c7b8ae8d01d1e2752903f Mon Sep 17 00:00:00 2001 From: Joshua Kuestersteffen Date: Thu, 7 Nov 2024 15:27:53 -0600 Subject: [PATCH] Switch to using npm clean script to remove dirs --- package.json | 3 ++- scripts/build/build-prepare.sh | 4 ---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 00cdcf43db..75029ca0d5 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 84285628c8..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 directories" -rm -rf build api/build -mkdir build api/build - node scripts/build/cli npmCiModules echo "build-prepare: building ddocs"