-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjustfile
More file actions
137 lines (103 loc) · 2.44 KB
/
Copy pathjustfile
File metadata and controls
137 lines (103 loc) · 2.44 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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
set shell := ["bash", "-cu"]
set windows-shell := ["pwsh", "-Command"]
tsc := "pnpm exec tsgo"
biome := "pnpm exec biome"
tsdown := "pnpm exec tsdown"
vitest := "pnpm exec vitest"
typedoc := "pnpm exec typedoc"
publish := "pnpm publish"
lsl_cfg := "-config ../../.ls-lint.yaml"
express := "packages/express"
test_express := "tests/express"
example_js := "examples/express-js"
example_ts := "examples/express-ts"
# Default action
_:
just --list -u
# Install
i:
pnpm install
# Format code
fmt:
{{biome}} check --write .
# Lint code with ls-lint
ls-lint:
cd ./{{express}} && ls-lint {{lsl_cfg}}
# Lint code with ls-lint
lslint:
just ls-lint
# Lint code with typos
typos:
typos
# Lint code with TypeScript Compiler
tsc:
cd ./{{express}} && {{tsc}} --noEmit
# Lint code
lint:
just lslint
just typos
just tsc
# Lint code with Biome
lint-biome:
{{biome}} lint .
# Build package
build:
cd ./{{express}} && {{tsdown}} -c tsdown.config.ts
# Run tests
test:
cd ./{{test_express}} && {{vitest}} run
# Check code
check:
just build
just fmt
just lint
just test
# Generate APIs documentation
api:
cd ./{{express}} && {{typedoc}}
# Publish express package as dry-run
publish-try-express:
cd ./{{express}} && {{publish}} --no-git-checks --dry-run
# Publish all packages as dry-run
publish-try:
just publish-try-express
# Publish express package
publish-express:
cd ./{{express}} && {{publish}}
# Publish all packages
publish:
just publish-express
# Clean builds (Linux)
clean-linux:
rm -rf ./examples/*/dist
rm -rf ./packages/*/dist
# Clean builds (macOS)
clean-macos:
just clean-linux
# Clean builds (Windows)
clean-windows:
Remove-Item -Recurse -Force ./examples/*/dist
Remove-Item -Recurse -Force ./packages/*/dist
# Clean builds
clean:
just clean-{{os()}}
# Clean everything (Linux)
clean-all-linux:
just clean
rm -rf ./examples/*/node_modules
rm -rf ./tests/*/node_modules
rm -rf ./packages/*/node_modules
rm -rf ./node_modules
# Clean everything (macOS)
clean-all-macos:
just clean-all-linux
# Clean everything (Windows)
clean-all-windows:
just clean
Remove-Item -Recurse -Force ./examples/*/node_modules
Remove-Item -Recurse -Force ./tests/*/node_modules
Remove-Item -Recurse -Force ./packages/*/node_modules
Remove-Item -Recurse -Force ./node_modules
# Clean everything
clean-all:
just clean-all-{{os()}}