perf(assets): convert images to webp and check asset paths
Convert 26 PNG/JPG assets to WebP: max 1600 px, q80, diagrams lossless. src/assets shrinks from 8.3 MB to 4.2 MB. Use me.jpg for og:image and twitter:image; some crawlers skip WebP. Add scripts/check-assets.mjs to lint, so a wrong asset path fails lint, not only at runtime.
This commit is contained in:
1 parent
4e59770e53
commit
2abc7c31e2
62 files changed
+74
-33
No files matched your search
@@ -90,6 +90,7 @@ Then open http://localhost:8080
|
||||
| `npm test` | Unit tests (Vitest + jsdom, no browser needed) |
|
||||
| `npm run lint` | ESLint over `src/**/*.ts` and `src/**/*.html` |
|
||||
| `npm run i18n:check` | Verifies `en.json` and `de.json` share the exact same keys |
|
||||
| `npm run assets:check` | Verifies every asset path referenced in `src/` exists (also runs in `npm run lint`) |
|
||||
|
||||
---
|
||||
|
||||
@@ -102,7 +103,7 @@ Triggered on every push to `main` and on pull requests targeting `main`.
|
||||
|
||||
**Job 1 — `quality-check`** (runs on both pushes and PRs):
|
||||
|
||||
1. Lint & type check — `npm run lint`
|
||||
1. Lint & type check — `npm run lint` (includes `npm run assets:check`)
|
||||
2. i18n key sync — `npm run i18n:check`
|
||||
3. Unit tests — `npm test`
|
||||
4. Production build — `npx ng build --configuration production`
|
||||
|
||||
Reference in new issue
Block a user