-
Notifications
You must be signed in to change notification settings - Fork 3
/
Justfile
61 lines (51 loc) · 1.29 KB
/
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
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
set shell := ['nu', '-c']
export TYPST_ROOT := justfile_directory()
# list recipes
[private]
default:
just --list
# generate example images
gen-examples:
rm --recursive --force pages examples/pages
mkdir examples/pages
typst compile --ppi 300 examples/pages.typ examples/pages/{n}.png
typst compile examples/main.typ examples/example.png
rm --recursive --force pages examples/pages
oxipng --opt max examples/example.png
# generate doc examples
gen-doc-examples:
#! /usr/bin/env nu
ls doc/examples
| where type == dir
| get name
| each {|it|
cd $it
rm --recursive --force out
mkdir out
[a b] | each {|it|
(typst compile
$"($it).typ"
$"out/($it){n}.png")
};
let pages = (ls out | length) / 2;
{ pages: $pages } | to toml | save -f out.toml
}
| ignore
oxipng --recursive --opt max doc
# generate the manual
doc: gen-doc-examples
typst compile doc/manual.typ doc/manual.pdf
# copy the files relevant for the package repo
publish output:
alabaster package {{ output }}
# run the test suite
test *args:
typst-test run {{ args }}
# update the test suite
update *args:
typst-test update {{ args }}
# run the ci test suite
ci:
# run one single test first to avoid a race condition on package downloads
typst-test run regressions/scoped-search
typst-test run