-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjustfile
More file actions
79 lines (62 loc) · 1.41 KB
/
justfile
File metadata and controls
79 lines (62 loc) · 1.41 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
set windows-shell := ["powershell.exe", "-NoLogo", "-Command"]
set shell := ["bash", "-cu"]
_default:
@just --list -u
alias test := test-rust
[group('test')]
test-rust:
cargo test
[group('test')]
test-bun:
bun test test_bun
[group('test')]
test-deno:
deno test test_deno --allow-read --parallel
[group('test')]
test-node:
node --test "test_node/*.test.mjs"
[group('test')]
test-wasm: test-node test-deno test-bun
[group('test')]
test-all: test-rust test-wasm
[unix]
build:
wasm-pack build --scope=wasm-fmt .
cp -R ./extra/. ./pkg/
node ./scripts/patch.mjs
[windows]
build:
wasm-pack build --scope=wasm-fmt .
Copy-Item -Recurse -Force ./extra/* ./pkg/
node ./scripts/patch.mjs
fmt:
cargo fmt --all
taplo fmt .
dprint fmt
check:
cargo check --all
cargo clippy --all -- -D warnings
cargo fmt --all --check
taplo fmt --check .
dprint check
audit:
cargo audit
ready:
just check
just build
just test-all
cd pkg && npm pack --dry-run
cd pkg && npx jsr publish --dry-run
# Bump version (major, minor, patch) or set specific version
version bump_or_version:
#!/usr/bin/env bash
if [[ "{{bump_or_version}}" =~ ^(major|minor|patch)$ ]]; then
cargo set-version --bump "{{bump_or_version}}"
else
cargo set-version "{{bump_or_version}}"
fi
VERSION=$(cargo pkgid | sed 's/.*[#@]//')
node ./scripts/sync_version.mjs "${VERSION}"
git add -A
git commit -m "${VERSION}"
git tag -a "v${VERSION}" -m "${VERSION}"