Skip to content

Commit

Permalink
build: Speed up playground build
Browse files Browse the repository at this point in the history
As discussed in PRQL#1836 (comment)
  • Loading branch information
max-sixty committed Jun 22, 2023
1 parent e638995 commit 4b59cda
Show file tree
Hide file tree
Showing 7 changed files with 1,205 additions and 50 deletions.
10 changes: 5 additions & 5 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -290,11 +290,14 @@ tasks:
cmds:
- mdbook serve --port=3000

# Use `npm install --install-links=false` to install prql-js
# as the regular dependency, instead of creating a
# symlink. Refer to https://github.com/PRQL/prql/pull/1296.
run-playground:
desc: Build & serve the playground.
dir: web/playground
cmds:
- npm install --install-links=false
- npm install --install-links=false --profile=dev
- npm start

run-playground-cached:
Expand All @@ -309,13 +312,10 @@ tasks:
# Use task's sources/generates to see if checksums of
# node_modules directory have changed since package.json was updated

# Use `npm install --install-links=false` to install prql-js
# as the regular dependency, instead of creating a
# symlink. Refer to https://github.com/PRQL/prql/pull/1296.
desc: Check to see if package.json has changed since we ran npm install
dir: web/playground
cmds:
- npm install --install-links=false
- npm install --install-links=false --profile=dev
sources:
- package.json
generates:
Expand Down
8 changes: 8 additions & 0 deletions bindings/prql-js/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@ JavaScript bindings for [`prql-compiler`](https://github.com/PRQL/prql/).
npm install prql-js
```

Pass `--profile=dev` for a faster, less optimized build. Without this, the
`wasm` binaries are optimized on each run, even if the underlying code hasn't
changed.

```sh
npm install prql-js --profile=dev
```

## Usage

Currently these functions are exposed
Expand Down
Loading

0 comments on commit 4b59cda

Please sign in to comment.