Add a deterministic authoring tool that turns a structured scenario markdown file into a validated scenario-data module: - tools/scenario-md.js: pure parseScenarioMarkdown + emitScenarioModule (frontmatter → meta; ## Timeline/## Clues/## Cast lists → the arrays; auto-slugged ids; validated via validateScenario before emit). - tools/md-to-scenario.mjs: CLI (npm run gen:scenario), file or stdout. - tools/example-scenario.md: documented format example. Parses a defined format, not freeform con prose. tools/ is dev-only and never bundled. tests/tools/scenario-md.test.js round-trips + validates. 187 tests pass; build clean. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
20 lines
389 B
JSON
20 lines
389 B
JSON
{
|
|
"name": "gm-director",
|
|
"version": "0.1.0",
|
|
"private": true,
|
|
"type": "module",
|
|
"scripts": {
|
|
"dev": "vite",
|
|
"build": "vite build",
|
|
"preview": "vite preview",
|
|
"test": "vitest run",
|
|
"test:watch": "vitest",
|
|
"gen:scenario": "node tools/md-to-scenario.mjs"
|
|
},
|
|
"devDependencies": {
|
|
"jsdom": "^24.0.0",
|
|
"vite": "^5.2.0",
|
|
"vitest": "^1.6.0"
|
|
}
|
|
}
|