Skip to content

Commit

Permalink
console: Fix server-build script on first run
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
lexi-lambda committed Aug 28, 2019
1 parent 298d5f9 commit dd8c403
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion console/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit dd8c403

Please sign in to comment.