Read the companion SCRIPT.md narration doc if it exists alongside the storyboard.
(projectDir: string)
| 28 | |
| 29 | /** Read the companion SCRIPT.md narration doc if it exists alongside the storyboard. */ |
| 30 | function readScript(projectDir: string): { exists: boolean; path: string; content: string } { |
| 31 | const abs = resolveWithinProject(projectDir, SCRIPT_FILENAME); |
| 32 | if (abs && existsSync(abs)) { |
| 33 | try { |
| 34 | return { exists: true, path: SCRIPT_FILENAME, content: readFileSync(abs, "utf-8") }; |
| 35 | } catch { |
| 36 | /* fall through to absent */ |
| 37 | } |
| 38 | } |
| 39 | return { exists: false, path: SCRIPT_FILENAME, content: "" }; |
| 40 | } |
| 41 | |
| 42 | export function registerStoryboardRoutes(api: Hono, adapter: StudioApiAdapter): void { |
| 43 | // Parsed storyboard manifest for a project. Markdown (STORYBOARD.md) stays |
no test coverage detected