Skip to content

Commit 710a46e

Browse files
committed
refactor: update justfile
1 parent 6f6dea8 commit 710a46e

1 file changed

Lines changed: 45 additions & 11 deletions

File tree

justfile

Lines changed: 45 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,16 @@ tst := "test"
1414

1515
# Default action
1616
_:
17-
just lint
18-
just fmt
19-
just build
20-
just test
17+
just --list -u
2118

2219
# Install
2320
i:
2421
pnpm install
2522

23+
# Format code
24+
fmt:
25+
{{biome}} check --write .
26+
2627
# Lint code
2728
lint:
2829
ls-lint -config .ls-lint.yaml
@@ -33,10 +34,6 @@ lint:
3334
lint-biome:
3435
{{biome}} lint .
3536

36-
# Format code
37-
fmt:
38-
{{biome}} check --write .
39-
4037
# Build package
4138
build:
4239
cd ./{{pkg}} && {{tsdown}} -c tsdown.config.ts
@@ -45,6 +42,13 @@ build:
4542
test:
4643
cd ./{{tst}} && {{vitest}} run
4744

45+
# Check code
46+
check:
47+
just fmt
48+
just lint
49+
just build
50+
just test
51+
4852
# Generate APIs documentation
4953
api:
5054
cd ./{{pkg}} && {{typedoc}}
@@ -65,16 +69,46 @@ publish-try:
6569
publish:
6670
cd ./{{pkg}} && {{publish}}
6771

72+
# Clean builds (Linux)
73+
clean-linux:
74+
rm -rf ./{{pkg}}/dist
75+
76+
# Clean builds (macOS)
77+
clean-macos:
78+
just clean-linux
79+
80+
# Clean builds (Windows)
81+
clean-windows:
82+
Remove-Item -Recurse -Force ./{{pkg}}/dist
83+
6884
# Clean builds
6985
clean:
70-
rm -rf ./package/dist
86+
just clean-{{os()}}
7187

72-
# Clean everything
73-
clean-all:
88+
# Clean everything (Linux)
89+
clean-all-linux:
7490
just clean
7591

7692
rm -rf ./{{tst}}/node_modules
7793

7894
rm -rf ./{{pkg}}/node_modules
7995

8096
rm -rf ./node_modules
97+
98+
# Clean everything (macOS)
99+
clean-all-macos:
100+
just clean-all-linux
101+
102+
# Clean everything (Windows)
103+
clean-all-windows:
104+
just clean
105+
106+
Remove-Item -Recurse -Force ./{{tst}}/node_modules
107+
108+
Remove-Item -Recurse -Force ./{{pkg}}/node_modules
109+
110+
Remove-Item -Recurse -Force ./node_modules
111+
112+
# Clean everything
113+
clean-all:
114+
just clean-all-{{os()}}

0 commit comments

Comments
 (0)