-
Notifications
You must be signed in to change notification settings - Fork 81
/
Copy pathjustfile
88 lines (73 loc) · 2.15 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
#!/usr/bin/env -S just --justfile
set windows-shell := ["powershell"]
set shell := ["bash", "-cu"]
_default:
just --list -u
alias r := ready
alias c := codecov
alias t := test
# Initialize the project by installing all the necessary tools.
# Make sure you have cargo-binstall installed.
# You can download the pre-compiled binary from <https://github.com/cargo-bins/cargo-binstall#installation>
# or install via `cargo install cargo-binstall`
init:
cargo binstall cargo-nextest cargo-watch cargo-insta typos-cli taplo-cli cargo-llvm-cov -y
# When ready, run the same CI commands
ready-lite:
typos
cargo fmt
just check
just test
just lint
pnpm biome:format
git status
ready:
typos
cargo fmt
just check
just test
just lint
cargo build --release
pnpm build
pnpm test
pnpm biome:format
git status
# Update our local branch with the remote branch (this is for you to sync the submodules)
update:
git pull
git submodule update --init
# Run `cargo watch`
# --no-vcs-ignores: cargo-watch has a bug loading all .gitignores, including the ones listed in .gitignore
# use .ignore file getting the ignore list
watch command:
cargo watch --no-vcs-ignores -x '{{command}}'
# Format all files
fmt:
cargo fmt
taplo format
pnpm biome:format
# Run cargo check
check:
cargo check --locked
# Run all the tests
test:
cargo nextest run
# Lint the whole project
lint:
cargo clippy --locked -- --deny warnings
# Get code coverage
codecov:
cargo codecov --html
cli +args:
cargo run --bin mako -- {{args}}
setup-bench:
echo "import * as three from './src/Three.js'; export { three }" > tmp/three/index.ts
mkdir -p tmp/three10x/multiChunks
for i in {1..10}; do cp -r ./tmp/three/src ./tmp/three10x/copy$i/; done
echo > tmp/three10x/index.ts
for i in {1..10}; do echo "import * as three$i from './copy$i/Three.js'; export { three$i }" >> tmp/three10x/index.ts; done
echo > tmp/three10x/multiChunks/index.ts
for i in {1..10}; do echo "import('../copy$i/Three.js');" >> tmp/three10x/multiChunks/index.ts; done
bench +args='':
npm run benchmark -- {{args}}