forked from typst-community/guidelines
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Justfile
30 lines (23 loc) · 760 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
28
29
30
root := justfile_directory()
main-src := root / 'src' / 'main.typ'
main-out := root / 'out' / 'api-and-style-guidelines.pdf'
export TYPST_ROOT := root
# export TYPST_FONT_PATHS := root / 'assets' / 'fonts'
# list the recipes by default
[private]
default:
@just --list --unsorted
# prepare output folders and artifacts
[private]
init:
mkdir --parents out
# run typst with the required environment variables
typst *args:
typst {{ args }}
# run typst-preview on the main document
preview *args:
typst-preview --root {{ root }} {{ main-src }} {{ args }}
# run typst compile on the main document
build *args: init (typst 'compile' main-src main-out args)
# run typst initwtch on the main document
watch *args: init (typst 'watch' main-src main-out args)