forked from rolldown/rolldown
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjustfile
103 lines (76 loc) · 1.65 KB
/
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
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
93
94
95
96
97
98
99
100
101
102
103
set windows-shell := ["powershell"]
set shell := ["bash", "-cu"]
_default:
just --list -u
# `smoke` command almost run all ci checks locally. It's useful to run this before pushing your changes.
smoke:
just smoke-rust
just smoke-node
smoke-rust:
just check-rust
just test-rust
just lint-rust
smoke-node:
just check-node
just test-node
just lint-node
# Initialize the project and its submodules
init:
just init-rust
just init-node
git submodule update --init
init-rust:
cargo binstall taplo-cli cargo-insta cargo-deny typos-cli -y
init-node:
pnpm install
# Update our local branch with the remote branch (this is for you to sync the submodules)
update:
git pull
git submodule update --init
# CHECKING
check-rust:
cargo check --workspace
check-node:
pnpm type-check
check-typo:
typos
check:
just check-rust
just check-node
just check-typo
# run tests for both Rust and Node.js
test:
just test-rust
just test-node
test-rust:
cargo test --no-fail-fast
test-node:
pnpm build
pnpm test
# Fix formatting issues both for Rust and Node.js.
fmt:
just fmt-rust
just fmt-lint
fmt-rust:
cargo fmt --all -- --emit=files
taplo fmt
fmt-lint:
pnpm prettier
# lint the codebase
lint:
just lint-rust
just lint-node
lint-rust:
cargo fmt --all -- --check
taplo fmt --check
cargo clippy --workspace --all-targets -- --deny warnings
lint-node:
pnpm lint-filename
pnpm lint-code
pnpm prettier:ci
pnpm lint-spell
# BENCHING
setup-bench:
node ./scripts/setup-rust-benchmark-input.js
bench:
cargo bench -p bench