From dd8c4039c334001b46fdcd907c4244a409e4f6ba Mon Sep 17 00:00:00 2001 From: Alexis King Date: Wed, 28 Aug 2019 07:40:42 -0500 Subject: [PATCH] console: Fix server-build script on first run Previously, the `rm static/dist/versioned/*.gz` step would fail on the first run, since the glob would match no files, and `rm` would complain. This approach just deletes the whole directory, which is probably better, anyway, since it avoids any lingering outdated files. --- console/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/console/package.json b/console/package.json index be92ede091a36..20439cbf2dc72 100644 --- a/console/package.json +++ b/console/package.json @@ -15,7 +15,7 @@ "start": "concurrently --kill-others \"npm run start-prod\"", "start-prod": "better-npm-run start-prod", "build": "webpack --progress -p --colors --display-error-details --config webpack/prod.config.js", - "server-build": "npm run build && mkdir -p static/dist/versioned && cp static/dist/*.js static/dist/*.css static/dist/versioned/ && rm static/dist/versioned/*.gz && gzip -r -f static/dist/versioned", + "server-build": "npm run build && rm -rf static/dist/versioned && mkdir -p static/dist/versioned && cp static/dist/*.js static/dist/*.css static/dist/versioned/ && gzip -r -f static/dist/versioned", "build-unused": "webpack --verbose --colors --display-error-details --config webpack/prod.config.js --json | webpack-unused -s src", "postinstall": "webpack --display-error-details --config webpack/prod.config.js", "lint": "eslint -c .eslintrc src api",