-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjustfile
More file actions
80 lines (60 loc) · 1.32 KB
/
justfile
File metadata and controls
80 lines (60 loc) · 1.32 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
73
74
75
76
77
78
79
80
set shell := ["bash", "-cu"]
set windows-shell := ["pwsh", "-Command"]
tsc := "pnpm exec tsc"
biome := "pnpm exec biome"
tsdown := "pnpm exec tsdown"
vitest := "pnpm exec vitest"
typedoc := "pnpm exec typedoc"
publish := "pnpm publish"
pkg := "package"
tst := "test"
# Default action
_:
just lint
just fmt
just build
just test
# Install
i:
pnpm install
# Lint code
lint:
ls-lint -config .ls-lint.yaml
typos
cd ./{{pkg}} && {{tsc}} --noEmit
# Lint code with Biome
lint-biome:
{{biome}} lint .
# Format code
fmt:
{{biome}} check --write .
# Build package
build:
cd ./{{pkg}} && {{tsdown}} -c tsdown.config.ts
# Run tests
test:
cd ./{{tst}} && {{vitest}} run
# Generate APIs documentation
api:
cd ./{{pkg}} && {{typedoc}}
# Publish package with dev tag as dry-run
publish-dev-try:
cd ./{{pkg}} && {{publish}} --no-git-checks --tag dev --dry-run
# Publish package with dev tag
publish-dev:
cd ./{{pkg}} && {{publish}} --no-git-checks --tag dev
# Publish package as dry-run
publish-try:
cd ./{{pkg}} && {{publish}} --dry-run
# Publish package
publish:
cd ./{{pkg}} && {{publish}}
# Clean builds
clean:
rm -rf ./package/dist
# Clean everything
clean-all:
just clean
rm -rf ./{{tst}}/node_modules
rm -rf ./{{pkg}}/node_modules
rm -rf ./node_modules