-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
41 lines (31 loc) · 890 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
32
33
34
35
36
37
38
39
40
41
generate:
tree-sitter generate
highlight: generate
tree-sitter highlight ./test/highlight.d2
parse: generate
clear
tree-sitter parse test.d2
dparse: generate
clear
tree-sitter parse test.d2 -d
test: generate
clear
tree-sitter test
# watch uses 2 utility tools, reload for live reloading and watchexec to
# watch for changes on d2/js/scm files and perform "make highlight"
watch-install:
brew install watchexec && npm i -g reload
watch-hl:
watchexec --exts d2,js,scm -- make highlight
watch-parse:
watchexec --exts d2,js,scm,txt -- make parse
watch-test:
watchexec --exts d2,js,scm,txt -- make test
# Do not use this, this is for temporary testing until I find a better way to
# inject queries
queries:
mkdir -p ~/.config/nvim/queries/d2/
cp queries/* ~/.config/nvim/queries/d2/
watch-copy-queries:
watchexec --exts d2,js,scm,txt -- make queries
.PHONY: all queries