-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJustfile
84 lines (64 loc) · 1.84 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
_root := justfile_directory()
set shell := ["bash", "-uc"]
set windows-shell := ["powershell.exe", "-NoLogo", "-Command"]
export TYPST_ROOT := _root
[private]
default:
@just --list --unsorted
# generate manual
doc:
typst compile docs/manual.typ docs/manual.pdf
# run test suite
test *args:
typst-test run {{ args }}
# update test cases
update *args:
typst-test update {{ args }}
# package the library into the specified destination folder on linux
[linux]
package target:
./scripts/package "{{target}}"
# package the library into the specified destination folder on windows
[windows]
package target:
./scripts/ps/package.ps1 "{{target}}"
# install the library with the "@local" prefix on linux
[linux]
install: (package "@local")
# install the library with the "@local" prefix on windows
[windows]
install: (package "@local")
# install the library with the "@preview" prefix (for pre-release testing) on linux
[linux]
install-preview: (package "@preview")
# install the library with the "@preview" prefix (for pre-release testing) on windows
[windows]
install-preview: (package "@preview")
[private]
[linux]
remove target:
./scripts/uninstall "{{target}}"
[private]
[windows]
remove target:
./scripts/ps/uninstall.ps1 "{{target}}"
# uninstalls the library from the "@local" prefix
[linux]
uninstall: (remove "@local")
# uninstalls the library from the "@local" prefix
[windows]
uninstall: (remove "@local")
# uninstalls the library from the "@preview" prefix (for pre-release testing)
[linux]
uninstall-preview: (remove "@preview")
# uninstalls the library from the "@preview" prefix (for pre-release testing)
[windows]
uninstall-preview: (remove "@preview")
# run ci suite
ci: test doc
# format all typst documents in the project
format:
typstyle format-all "{{_root}}"
# optimize all pngs with oxipng
oxipng:
find . -name "*.png" -exec oxipng {} \;