(root: string, label: string)
| 34 | } |
| 35 | |
| 36 | function writeViewModule(root: string, label: string): string { |
| 37 | mkdirSync(root, { recursive: true }); |
| 38 | const file = join(root, "view.mjs"); |
| 39 | writeFileSync( |
| 40 | file, |
| 41 | [ |
| 42 | `export function view(state) { return { kind: "text", text: ${JSON.stringify(label)} + ":" + String(state.value), props: {} }; }`, |
| 43 | "", |
| 44 | ].join("\n"), |
| 45 | "utf8", |
| 46 | ); |
| 47 | return file; |
| 48 | } |
| 49 | |
| 50 | function writeRoutesModule(root: string, label: string): string { |
| 51 | mkdirSync(root, { recursive: true }); |
no outgoing calls
no test coverage detected