Skip to content

Commit

Permalink
build: Speed up playground build slightly
Browse files Browse the repository at this point in the history
We no longer need to run a build command in the playground on `prql-js`, since the command is now part of `prql-js`'s `preinstall`.

This givs us some speedup — 23s down from 32s — but most of the time is still taken up by re-running `wasm-opt`.

There's an issue for this in rustwasm/wasm-pack#1152. But probably `wasm-opt` should be run by `build.rs` which knows whether it requires re-running based on changed input files https://doc.rust-lang.org/cargo/reference/build-scripts.html

I think the current state is probably OK — we still get instant feedback when developming the playground; this is only required when _starting_ the playground on changing `prql-js`
  • Loading branch information
max-sixty committed Mar 18, 2023
1 parent f90e1da commit ed37858
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion web/playground/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"scripts": {
"build": "npm run genBook && react-scripts build",
"eject": "npm run genBook && react-scripts eject",
"preinstall": "cp -r ../../prql-compiler/tests/integration/data public && cd ../../bindings/prql-js && npm run build:bundler",
"preinstall": "cp -r ../../prql-compiler/tests/integration/data public",
"start": "npm run genBook && react-scripts start",
"test": "npm run genBook && react-scripts test",
"genBook": "node generateBook.js"
Expand Down

0 comments on commit ed37858

Please sign in to comment.