-
-
Notifications
You must be signed in to change notification settings - Fork 8
/
justfile
61 lines (43 loc) · 1.66 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
# Basic development tasks, run with `just`. Less strict than `just ci`.
default: test reformat lint
# Run things the same way CI does
ci: test lint check-format
# Install all dependencies that are not already installed (requires `cargo-binstall`)
install-all-dependencies: install-lint-dependencies install-docs-dependencies
# Run a local webserver for testing the docs.
serve-docs:
npm run --prefix docs start
# Build the docs, checking for broken links
build-docs:
npm run --prefix docs build
test:
cargo t --workspace
# Update the snapshot of specific tests, like `just snapshot <id_of_test_to_update> <another id>`
snapshot +tests:
SNAPSHOTS=overwrite cargo t {{tests}}
lint:
cargo clippy --workspace -- -D warnings
cargo-deny check
# Reformat all files, requires `npx` and `install-lint-dependencies`
reformat: reformat-rust reformat-toml reformat-docs
reformat-rust:
cargo +nightly fmt
reformat-toml:
taplo format
reformat-docs:
npx prettier *.md .changeset/*.md --write --no-error-on-unmatched-pattern
npm --prefix docs run reformat
check-format: check-rust-format check-toml-format check-docs-format
check-rust-format:
cargo +nightly fmt -- --check
check-toml-format:
taplo format --check
check-docs-format:
npx prettier *.md .changeset/*.md --list-different --no-error-on-unmatched-pattern
npm --prefix docs run check-format
# Install dependencies for `lint`, `default`, `check-format`, `reformat`, and some of `ci`. Requires `cargo-binstall`
install-lint-dependencies:
cargo binstall --no-confirm cargo-deny taplo-cli {{binstall_args}}
install-docs-dependencies:
npm install --prefix docs
binstall_args := ""