-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMakefile
31 lines (22 loc) · 865 Bytes
/
Makefile
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
JL = julia --project
default: init test
init:
$(JL) -e 'using Pkg; Pkg.precompile(); Pkg.activate("docs"); Pkg.develop(path="."), Pkg.precompile()'
update:
$(JL) -e 'using Pkg; Pkg.update(); Pkg.precompile(); Pkg.activate("docs"); Pkg.update(); Pkg.precompile()'
test:
$(JL) -e 'using Pkg; Pkg.test()'
coverage:
$(JL) -e 'using Pkg; Pkg.test(; coverage=true)'
serve:
$(JL) -e 'using Pkg; Pkg.activate("docs"); using LiveServer; servedocs(;skip_dirs=["docs/src/assets", "docs/src/generated"], literate_dir="examples")'
fig:
for entry in "docs/src/assets/"*.typ; do \
echo compiling $$entry to $${entry%.typ}.pdf; \
typst compile $$entry $${entry%.typ}.pdf; \
pdf2svg $${entry%.typ}.pdf $${entry%.typ}.svg; \
done
clean:
rm -rf docs/build
find . -name "*.cov" -type f -print0 | xargs -0 /bin/rm -f
.PHONY: init test coverage serve clean update