mirror of
https://github.com/phranck/TUIkit.git
synced 2026-06-20 09:54:37 +00:00
- Remove 'as const' from generated terminal-data.ts - Add type assertion for INTERACTIONS array to fix TypeScript error - Fixes production build failure with readonly type mismatch
24 lines
700 B
TypeScript
24 lines
700 B
TypeScript
/**
|
|
* Build script to generate terminal-data.ts from terminal-script.md
|
|
* Run this during build to convert markdown to TypeScript module
|
|
*/
|
|
|
|
import { parseTerminalScript } from "../lib/terminal-parser";
|
|
import fs from "fs";
|
|
import path from "path";
|
|
|
|
const script = parseTerminalScript();
|
|
const outputPath = path.join(process.cwd(), "app", "components", "terminal-data.ts");
|
|
|
|
const tsContent = `/**
|
|
* Auto-generated from terminal-script.md
|
|
* DO NOT EDIT THIS FILE DIRECTLY - Edit terminal-script.md instead
|
|
*/
|
|
|
|
export const TERMINAL_SCRIPT = ${JSON.stringify(script, null, 2)};
|
|
`;
|
|
|
|
fs.writeFileSync(outputPath, tsContent);
|
|
|
|
console.log("✓ Generated terminal-data.ts from terminal-script.md");
|