|
| 1 | +# Use the native shell on Windows; Unix keeps just's default `sh` shell. |
| 2 | + |
| 3 | +set windows-shell := ["powershell.exe", "-NoLogo", "-NoProfile", "-Command"] |
| 4 | + |
| 5 | +# Show the available repository tasks. |
| 6 | +default: |
| 7 | + @just --list |
| 8 | + |
| 9 | +# Install locked Python and Node.js dependencies. |
| 10 | +setup: |
| 11 | + uv sync --locked |
| 12 | + npm ci --prefix config-generator |
| 13 | + npm ci --prefix tests/config-generator |
| 14 | + |
| 15 | +# Compile WASM, then start the config generator at http://127.0.0.1:8080/. |
| 16 | +dev: |
| 17 | + npm run dev --prefix config-generator |
| 18 | + |
| 19 | +# Start Vite without rebuilding WASM (for Svelte/CSS-only changes). |
| 20 | +dev-ui: |
| 21 | + npm exec --prefix config-generator -- vite --host 127.0.0.1 --port 8080 |
| 22 | + |
| 23 | +# Rebuild WASM after Rust or XML changes while Vite is running. |
| 24 | +wasm: |
| 25 | + npm run wasm --prefix config-generator |
| 26 | + |
| 27 | +# Start the documentation development server. |
| 28 | +docs: |
| 29 | + uv run --locked zensical serve |
| 30 | + |
| 31 | +# Run formatting, native/WASM Rust checks, tests, and Svelte checks. |
| 32 | +check: |
| 33 | + cargo +nightly fmt --all --check |
| 34 | + cargo test --workspace --locked |
| 35 | + cargo clippy --workspace --all-targets --locked -- -D warnings |
| 36 | + cargo clippy --target wasm32-unknown-unknown --lib --locked -- -D warnings |
| 37 | + npm run check --prefix config-generator |
| 38 | + |
| 39 | +# Build the documentation and standalone generator under site/. |
| 40 | +build: |
| 41 | + uv run --locked python scripts/build-site.py |
| 42 | + |
| 43 | +# Build and validate the combined site. |
| 44 | +site-check: build |
| 45 | + uv run --locked python tests/config-generator/check-site.py |
| 46 | + |
| 47 | +# Run browser regression tests against a temporary server for config-generator/dist/. |
| 48 | +browser: |
| 49 | + uv run --locked python tests/config-generator/run-browser.py |
| 50 | + |
| 51 | +# Run browser regression tests against the combined deployment-prefix build. |
| 52 | +browser-site: build |
| 53 | + uv run --locked python tests/config-generator/run-browser.py --directory site/config-generator --prefix /tuic/config-generator/ |
| 54 | + |
| 55 | +# Build, validate, and serve the combined site preview. |
| 56 | +preview: site-check |
| 57 | + uv run --locked python tests/config-generator/preview-server.py |
0 commit comments