-
Notifications
You must be signed in to change notification settings - Fork 10
/
justfile
27 lines (21 loc) · 950 Bytes
/
justfile
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
version := "0.4.0"
commit_hash := `git rev-parse --short HEAD`
benchmark_file := "tests/benchmark-" + commit_hash + ".md"
benchmark_commands := `find examples/**/*.typ -type f | xargs -I {} printf "'typst compile --root . {}' "`
# copy typst package to local registry
local:
mkdir -p ~/.local/share/typst/packages/local/glossarium/{{version}}
cp -r * ~/.local/share/typst/packages/local/glossarium/{{version}}
build-examples:
@find examples/**/*.typ -type f -exec sh -c "echo --------- Compiling {} && time typst compile --root . {}" \;
test:
find tests/**/*.typ -type f | xargs -I{} typst compile --root . {}
# format typst code (use typstfmt)
fmt:
typstyle format-all
# benchmark using hyperfine
benchmark:
hyperfine --warmup 10 --prepare 'find examples/**/*.pdf -delete' --export-markdown {{benchmark_file}} {{benchmark_commands}}
# build advanced docs
docs:
typst compile advanced-docs/main.typ --root .