Repository navigation
Expand file tree
/
Copy pathTaskfile.yaml
More file actions
221 lines (188 loc) · 7.58 KB
/
Copy pathTaskfile.yaml
File metadata and controls
221 lines (188 loc) · 7.58 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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
version: "3"
tasks:
dev:
desc: Spin up the dev server in Docker (http://localhost:6217)
summary: |
Start the development environment with hot-reloading, in a container.
The working tree is bind-mounted, so edits reload normally. node_modules
and .nuxt stay container-local — the host's are built for glibc, the
container is alpine/musl, and sharing them produces native-module errors
that look like Nuxt bugs.
The dev server binds to the non-standard port 6217 (not 3000), with
Vite's HMR socket on 6218, so it never collides with another local dev
server — see "Dev server ports" in AGENTS.md.
Use `task dev:host` to run it directly on the host instead.
cmds:
- docker compose up dev
dev:host:
desc: Spin up the dev server on the host, without Docker
summary: |
Same ports as `task dev`, running straight from your local pnpm install.
Faster startup; requires pnpm 11 and Node 24+ locally. Don't run this and
`task dev` at the same time — they both bind 6217.
deps:
- task: setup
cmds:
- pnpm dev
setup:
desc: Install project dependencies
summary: |
Install all frontend dependencies with a frozen lockfile.
sources:
- package.json
generates:
- pnpm-lock.yaml
cmd: pnpm install --frozen-lockfile
qa:
desc: Run various QA checks on the source code
summary: |
Run various QA checks on the source code using ESLint and Prettier
to ensure the source code follows a uniform coding practice.
Should be run before committing changes.
cmds:
- task: lint
- task: format:check
lint:
desc: Lint the source code
cmd: pnpm lint
lint:fix:
desc: Fix automatically repairable lint issues
cmd: pnpm lint:fix
format:
desc: Format the source tree
cmd: pnpm format
format:check:
desc: Check source formatting without changing files
cmd: pnpm format:check
typecheck:
desc: Type-check the app, scripts, tests, and shared code
cmd: pnpm typecheck
validate:content:
desc: Validate content schemas and cross-file integrity
cmd: pnpm validate:content
test:
desc: Run the entire test suite
summary: |
Run the Vitest unit test suite.
cmd: pnpm test
test:e2e:
desc: Run browser acceptance tests against the generated site
summary: |
Serve .output from `pnpm generate` and exercise the core reader journey
in Chromium. Install the browser once with
`pnpm exec playwright install chromium` when running on a new machine.
cmd: pnpm test:e2e
generate:
desc: Statically generate the site
summary: |
Run the static regression build used by `task check`. Production is the
Nitro server image, not this artifact. Prerendering peaks around 5 GB
resident, past V8's default heap.
cmd: NODE_OPTIONS="--max-old-space-size=6144" pnpm generate
verify:fonts:
desc: Fail if the generated site lost its fonts
summary: |
Check the generated output actually ships the font files and @font-face
rules, including Hebrew coverage. Every way this breaks — a dropped
subset, a vendored provider that resolves nothing — produces a
successful build and a silently wrong site, so it is checked rather
than trusted. Requires a prior `task generate`.
cmd: node scripts/verify-font-output.mjs
check:
desc: Run the complete pre-commit verification suite
summary: |
Run every required quality gate: linting, formatting, type-checking,
content validation, unit tests, static site generation, the font-output
check, and the Playwright end-to-end suite against the generated
artifact.
cmds:
- task: qa
- task: typecheck
- task: validate:content
- task: test
- task: generate
- task: verify:fonts
- task: test:e2e
import:
desc: Import content from Sefaria
summary: |
Run the Sefaria importer. Pass its CLI flags through after `--`,
e.g.:
task import -- --part 1
task import -- --all --dry-run
cmd: pnpm import:sefaria {{.CLI_ARGS}}
import:kabbalahmedia:
desc: Import the official Bnei Baruch translation from KabbalahMedia
summary: |
Run the KabbalahMedia importer for one part or the full corpus. Pass
its CLI flags through after `--`; exactly one of `--part <N>` or
`--all` is required, and `--dry-run` makes no file changes, e.g.:
task import:kabbalahmedia -- --part 1 --dry-run
task import:kabbalahmedia -- --all
cmd: pnpm import:kabbalahmedia {{.CLI_ARGS}}
clean:
desc: Clean up the development environment
summary: |
Remove all build artifacts, caches, and installed dependencies.
Run this to start fresh.
cmds:
- rm -rf ./.nuxt
- rm -rf ./.output
- rm -rf ./coverage
# A stray Nuxt/Vite process (e.g. a host `pnpm dev`) keeps re-creating
# node_modules/.cache while we delete it, so a single `rm` can fail with
# "Directory not empty". Retry a few times before giving up for real.
- |
for i in 1 2 3 4 5; do
rm -rf ./node_modules && break
echo "node_modules busy (a dev server still running?), retrying ($i/5)..."
sleep 1
done
test ! -d ./node_modules
# Project-local pnpm store — the dev container can leave one here
# (root-owned) when it can't use $PNPM_HOME; it's a cache, never source.
- rm -rf ./.pnpm-store
- rm -rf ./.task
prod:
desc: Build the SSR bundle and serve it with the Nitro Node server (http://localhost:6219)
summary: |
Builds `.output/server/index.mjs` (`nuxt build`) and serves it with
`node`, the same production shape weburz uses. Use this to verify the
real production server — SSR rendering, 404s, prerendered sitemap —
instead of a static-file preview.
Set NUXT_PUBLIC_SITE_URL to use a different canonical origin; it defaults
to https://readtes.com.
The build needs a large Node heap: the full-corpus SSR bundle is bigger
than V8's default, so this task sets --max-old-space-size=8192.
cmds:
- NODE_OPTIONS="--max-old-space-size=8192" NUXT_PUBLIC_SITE_URL=${NUXT_PUBLIC_SITE_URL:-https://readtes.com} pnpm build
- NODE_ENV=production HOST=0.0.0.0 PORT=6219 pnpm start
docker:server:
desc: Build and run the Node server image Coolify deploys (http://localhost:6220)
summary: |
Builds the `server` Dockerfile target (`nuxt build` with
READTES_DEPLOY_TARGET=server — reader pages render on request) and runs
it. See docs/deploy-coolify.md.
cmds:
- docker compose up --build server
docker:prod:
desc: Build and serve the generated static site (http://localhost:6219)
summary: |
Runs `nuxt generate` inside the image and serves .output/public with
nginx. Use this to verify the real deploy artifact — 404 status codes,
cache headers, the prerendered sitemap — which `pnpm preview` does not
exercise the same way.
Set NUXT_PUBLIC_SITE_URL to bake a different canonical origin; it
defaults to https://readtes.com.
cmds:
- docker compose build prod
- docker compose up prod
docker:build:
desc: Build both Docker images without starting anything
cmd: docker compose build
docker:clean:
desc: Remove this project's containers, volumes, and images
summary: |
Docker-only teardown. `task clean` handles host-side build artifacts;
this handles everything Docker created.
cmd: docker compose down --remove-orphans --volumes --rmi all