-
Notifications
You must be signed in to change notification settings - Fork 255
Expand file tree
/
Copy pathTaskfile.yaml
More file actions
61 lines (55 loc) · 2.06 KB
/
Copy pathTaskfile.yaml
File metadata and controls
61 lines (55 loc) · 2.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# yaml-language-server: $schema=https://json.schemastore.org/taskfile.json
version: "3"
tasks:
build:
desc:
Build the web products for distribution - Website, Book, and Playground.
cmds:
- cd website && hugo --minify
- cd book && mdbook build
- mkdir -p website/public
# Copy the book into the website path, using rsync so it only copies new files
- rsync -ai --checksum --delete --no-times book/book/ website/public/book/
# (we don't use `build-playground-dependencies`, since that uses the dev profile)
- cd playground && npm ci && npm run build
# We place the playground app in a nested path, because we want to use
# prql-lang.org/playground with an iframe containing the playground.
# Possibly there's a more elegant way of doing this...
- rsync -ai --checksum --delete --no-times playground/dist/
website/public/playground/playground/
run-website:
desc: Build & serve the static website for interactive development.
dir: website
cmds:
- hugo server --bind 0.0.0.0
run-book:
desc: Build & serve the book for interactive development.
dir: book
cmds:
- mdbook serve --port=3000 -n 0.0.0.0
run-playground:
desc: Build & serve the playground for interactive development.
dir: playground
env:
PROFILE: dev
cmds:
- task: build-playground-dependencies
- npm run dev
build-playground-dependencies:
# Check if npm dependencies for the playground need to be updated
# Use task's sources/generates to see if package.json,
# or anything in crates or bindings was updated after the
# node_modules was rebuilt
desc: Install deps, checking whether a dependency recently changed
dir: playground
env:
PROFILE: dev
cmds:
- npm ci
# Note that now we have `PROFILE: dev`, the build is much much faster, and
# we could remove this sources check if it became inconvenient.
sources:
- package.json
- package-lock.json
- ../../prqlc/**/*.rs
- ../../prqlc/bindings/**/*.rs