-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjustfile
More file actions
93 lines (73 loc) · 3.08 KB
/
Copy pathjustfile
File metadata and controls
93 lines (73 loc) · 3.08 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
# Recipes assume a POSIX shell: Unix keeps just's default `sh`, Windows uses Git Bash.
# Git Bash (`bash`) must be on PATH when running `just` on Windows.
set windows-shell := ["bash", "-c"]
# Pinned Zensical version, run on demand with `uvx`.
zensical := 'zensical==0.0.65'
# Show the available repository tasks.
default:
@just --list
# Install Node.js dependencies.
setup:
npm ci --prefix config-editor
npm ci --prefix tests/config-editor
# Compile WASM, then start the config editor at http://127.0.0.1:8080/.
dev:
npm run dev --prefix config-editor
# Start Vite without rebuilding WASM (for Svelte/CSS-only changes).
dev-ui:
npm exec --prefix config-editor -- vite --host 127.0.0.1 --port 8080
# Rebuild WASM after Rust or XML changes while Vite is running.
wasm:
npm run wasm --prefix config-editor
# Start the TUIC documentation development server.
docs:
uvx '{{zensical}}' serve -f tuic/zensical.toml
# Start the Wind documentation development server.
docs-wind:
uvx '{{zensical}}' serve -f wind/zensical.toml
# Run formatting, native/WASM Rust checks, tests, and Svelte checks.
check:
cargo +nightly fmt --all --check
cargo test --workspace --locked
cargo clippy --workspace --all-targets --locked -- -D warnings
cargo clippy --target wasm32-unknown-unknown --lib --locked -- -D warnings
npm run check --prefix config-editor
npm run test --prefix config-editor
# Build the TUIC documentation site into tuic/site/.
build-docs-tuic:
uvx '{{zensical}}' build --clean -f tuic/zensical.toml
# Build the Wind documentation site into wind/site/.
build-docs-wind:
uvx '{{zensical}}' build --clean -f wind/zensical.toml
# Build the standalone configuration editor for the /config-editor/ prefix.
build-editor:
npm run build --prefix config-editor -- --base /config-editor/
# Build every documentation site and the standalone editor under site/.
build: build-docs-tuic build-docs-wind build-editor
rm -rf site
mkdir -p site
cp -r tuic/site site/tuic
cp -r wind/site site/wind
cp -r config-editor/dist site/config-editor
cp portal/index.html site/index.html
# Build and validate the assembled site.
site-check: build
cargo +nightly -Zscript tests/config-editor/check-site.rs
# Run browser regression tests against the standalone editor build.
browser:
npm run build --prefix config-editor
npm test --prefix tests/config-editor
# Run browser regression tests against the assembled deployment build.
browser-site: build
npm run test:site --prefix tests/config-editor
# Run the XML-reuse browser regression against the example description.
browser-generic:
CONFIG_SCHEMA=schema/example.xml npm run build --prefix config-editor -- --outDir ../.cache/generic-site
npm run test:generic --prefix tests/config-editor
# Run Svelte component tests in real browsers (requires the WASM package).
test-browser:
npm run wasm --prefix config-editor
npm run test:browser --prefix config-editor
# Build, validate, and serve the assembled site preview.
preview: site-check
node tests/config-editor/serve.mjs --dir site --port 8765