mirror of
https://github.com/dong-nz/cv.git
synced 2026-11-22 16:10:40 +07:00
scripts/generate-content-types.ts writes the gitignored src/types/content-ids.ts (id unions + project category values) from the four structure documents; wired as generate:ids / predev / prebuild / prepare. src/types/index.ts re-exports them type-only and keeps only the code-owned unions. Edit mode now writes JSON only: the v4 union leg is deleted (saveIdUnions, diffIdsWithUnions, applyUnionChanges, readUnionBlock, the EditBar union card, edit.union.* labels). Validator rule 7 requires a label for every category a project uses, in both ui/projects.json documents. Tests: smoke-draft.ts 11/11 (rename re-sluging + category-label rule replace checks 9-12); new scripts/smoke-generated-ids.ts 7/7. Verified: pnpm build (chunk names unchanged, no runtime reference to the generated module), lint with no new warnings, validate:content, resume HTML byte-identical before/after with identical documents. Docs: spec-v5-generated-content-ids.md added; spec-v4-live-edit.md §3.1 marked superseded + §12 row 23; AGENTS.md and README.md updated.
39 lines
1.2 KiB
JSON
39 lines
1.2 KiB
JSON
{
|
|
"name": "portfolio",
|
|
"private": true,
|
|
"version": "0.0.0",
|
|
"type": "module",
|
|
"scripts": {
|
|
"dev": "vite",
|
|
"predev": "pnpm generate:ids",
|
|
"build": "tsc -b && vite build && pnpm tsx scripts/generate-sitemap.ts",
|
|
"prebuild": "pnpm generate:ids",
|
|
"generate:ids": "pnpm tsx scripts/generate-content-types.ts",
|
|
"prepare": "pnpm generate:ids",
|
|
"build:resume": "pnpm tsx scripts/generate-resume.ts",
|
|
"build:resume-all": "pnpm tsx scripts/generate-resume.ts --lang=all",
|
|
"build:resume-preview": "pnpm tsx scripts/generate-resume.ts --preview",
|
|
"lint": "oxlint",
|
|
"sitemap": "pnpm tsx scripts/generate-sitemap.ts",
|
|
"validate:content": "pnpm tsx scripts/validate-content.ts",
|
|
"preview": "vite preview"
|
|
},
|
|
"dependencies": {
|
|
"motion": "^14.0.0",
|
|
"react": "^19.2.8",
|
|
"react-dom": "^19.2.8",
|
|
"react-router": "8.4.0"
|
|
},
|
|
"devDependencies": {
|
|
"@types/node": "^24.13.3",
|
|
"@types/react": "^19.2.18",
|
|
"@types/react-dom": "^19.2.7",
|
|
"@vitejs/plugin-react": "^6.1.1",
|
|
"oxlint": "^1.81.0",
|
|
"playwright": "^1.64.0",
|
|
"tsx": "^4.23.15",
|
|
"typescript": "~6.0.2",
|
|
"vite": "^8.3.0"
|
|
}
|
|
}
|