-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathJustfile
More file actions
92 lines (71 loc) · 2.6 KB
/
Copy pathJustfile
File metadata and controls
92 lines (71 loc) · 2.6 KB
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
85
86
87
88
89
90
91
92
set windows-shell := ["pwsh", "-NoProfile", "-Command"]
# List available recipes
default:
just --list
# Run all wirescript tests
test:
cargo test -p wirescript --lib
# Run a specific test by name
test-one name:
cargo test -p wirescript --lib -- {{name}}
# Build wirescript lib + check binary (debug)
build:
cargo build -p wirescript
# Build everything release
release:
cargo build --release -p wirescript -p wirescript-lsp -p wirescript-cli
# Build LSP server (release)
lsp:
cargo build --release -p wirescript-lsp
# Build check CLI (release)
check-bin:
cargo build --release -p wirescript --bin wirescript-check
# Build WASM module (for playground/SDK)
wasm:
wasm-pack build crates/wasm --target nodejs --release --out-dir playground/sdk/pkg
# Check a .ws file for errors
check file:
cargo run --release --bin wirescript-check -- {{file}}
# Check all .ws files in a directory
[windows]
check-dir dir:
Get-ChildItem -Path {{dir}} -Filter *.ws | ForEach-Object { cargo run --release --bin wirescript-check -- $_.FullName }
# Check all .ws files in a directory
[unix]
check-dir dir:
for f in {{dir}}/*.ws; do cargo run --release --bin wirescript-check -- "$f"; done
# Compile a .ws file to .brz
compile file:
cargo run --release -p wirescript-cli -- compile {{file}}
# Compile a .ws file to .brdb (SQLite, for BR.World.LoadAdditive)
compile-brdb file:
cargo run --release -p wirescript-cli -- compile {{file}} -o {{without_extension(file)}}.brdb
# Dump the lowered IR for a .ws file
ir file:
cargo run --release -p wirescript-cli -- compile {{file}} --dump-ir
# Rebuild VS Code extension (compile TS + formatter)
[windows]
vscode:
Set-Location editors/vscode; npm install; npm run build
# Rebuild VS Code extension (compile TS + formatter)
[unix]
vscode:
cd editors/vscode && npm install && npm run build
# Regenerate the tree-sitter parser from grammar.js and run its corpus
[windows]
treesitter:
Set-Location editors/tree-sitter-wirescript; npm install; npx tree-sitter generate; npx tree-sitter test
# Regenerate the tree-sitter parser from grammar.js and run its corpus
[unix]
treesitter:
cd editors/tree-sitter-wirescript && npm install && npx tree-sitter generate && npx tree-sitter test
# Copy wirescript docs into playground for serving
[windows]
playground-docs:
Copy-Item -Path docs/wirescript/*.md -Destination crates/wasm/playground/docs/ -Force
# Copy wirescript docs into playground for serving
[unix]
playground-docs:
cp -f docs/wirescript/*.md crates/wasm/playground/docs/
# Build everything (lib + lsp + cli + wasm + vscode)
all: release wasm vscode