-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathJustfile
More file actions
72 lines (57 loc) · 1.77 KB
/
Justfile
File metadata and controls
72 lines (57 loc) · 1.77 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
# List all available recipes
_:
@just --list
# Format Rust code using rustfmt
fmt:
cargo fmt --all --
# Check if code is formatted correctly without modifying files
fmt-check:
cargo fmt --check
# Build the project for native target
build:
cargo build --all-features
# Build WebAssembly package with wasm-pack
build-wasm:
wasm-pack build \
--mode no-install \
--no-default-features
# Auto-fix clippy warnings where possible
fix:
cargo clippy --fix --allow-dirty -- -Dwarnings --no-deps
# Run clippy lints to check code quality
lint:
cargo clippy --workspace --all-targets -- -Dwarnings --no-deps
# Check that all public items have documentation
lint-docs:
cargo rustdoc --lib -- -D missing_docs -D rustdoc::broken_intra_doc_links
# Run all prek pre-commit hooks on all files
pre-commit:
prek run --all-files
# Run unit tests with cargo
test:
cargo test --workspace
# Run WASM tests in Node.js and browsers (Chrome, Firefox) Note: for macOS test Safari with --safari
test-wasm:
wasm-pack test \
--release \
--node \
--headless \
--chrome \
--firefox \
--mode no-install \
--no-default-features
# Rebuild static JSON-LD context files
update-static-contexts:
cd integrity-jsonld/static_contexts && make clean && make all
# Update README.md with auto-generated content (Justfile commands, etc.)
readme-update:
present --in-place README.md
# Check if README.md is up to date with auto-generated content
readme-check: _tmp
present README.md > tmp/README.md
diff README.md tmp/README.md
# Run all CI checks (format, build, lint, test)
ci: fmt-check readme-check build build-wasm lint lint-docs test test-wasm
# Create temporary directory for artifacts
_tmp:
mkdir -p tmp