-
Notifications
You must be signed in to change notification settings - Fork 4
/
justfile
35 lines (27 loc) · 811 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
31
32
33
34
35
#!/usr/bin/env -S just --justfile
# ^ A shebang isn't required, but allows a justfile to be executed
# like a script, with `./justfile test`, for example.
# Show available commands
default:
@just --list --justfile {{justfile()}}
# Generate the c parser from the grammar.
generate:
tree-sitter generate
# Build to Wasm
build:
tree-sitter build --wasm --output ./build/parser.wasm .
# Test the parser
test: generate
tree-sitter test
[private]
remove-local:
rm -rf ~/.local/share/nvim/lazy/nvim-treesitter/queries/wit
# Install the queries locally
install-local: remove-local
cp -r ./queries ~/.local/share/nvim/lazy/nvim-treesitter/queries/wit
# Format the queries
format-queries:
nvim -l scripts/format-queries.lua
# Lint the grammar
lint-grammar:
npx eslint grammar.js