mirror of
https://github.com/phranck/TUIkit.git
synced 2026-06-20 09:54:37 +00:00
- Fix: parseTerminalFormatting used undefined 'key' instead of 'partKey' (TS error) - Fix: ESLint setState-in-effect errors (4→0) via cleanup patterns and hydration-sync - Feat: Auto test/suite counts from Swift project at build-time (prebuild script + env vars) - Refactor: ArchHighlight sub-component eliminates 4× duplicated pattern in page.tsx - Refactor: BTN_PRIMARY/BTN_SECONDARY constants replace duplicated button classes - Refactor: CRT geometry object centralizes repeated calc() layer positions - Refactor: 13 magic numbers → named constants in TerminalScreen (timings, delays) - Refactor: Icon component extended with custom SVG support (copy icon) - Refactor: cloudGradient() helper replaces 6× duplicated radial-gradient strings - Refactor: HIGHLIGHT constants object for syntax highlighter colors - Refactor: text-glow CSS utility replaces duplicated textShadow inline styles
31 lines
770 B
TypeScript
31 lines
770 B
TypeScript
import type { NextConfig } from "next";
|
|
import fs from "fs";
|
|
import path from "path";
|
|
|
|
/** Read project stats generated by the prebuild script. */
|
|
function readProjectStats(): { testCount: number; suiteCount: number } {
|
|
const statsPath = path.join(process.cwd(), "project-stats.json");
|
|
try {
|
|
const raw = fs.readFileSync(statsPath, "utf-8");
|
|
return JSON.parse(raw);
|
|
} catch {
|
|
return { testCount: 0, suiteCount: 0 };
|
|
}
|
|
}
|
|
|
|
const stats = readProjectStats();
|
|
|
|
const nextConfig: NextConfig = {
|
|
output: "export",
|
|
images: {
|
|
unoptimized: true,
|
|
},
|
|
env: {
|
|
TUIKIT_VERSION: process.env.TUIKIT_VERSION ?? "0.1.0",
|
|
TUIKIT_TEST_COUNT: String(stats.testCount),
|
|
TUIKIT_SUITE_COUNT: String(stats.suiteCount),
|
|
},
|
|
};
|
|
|
|
export default nextConfig;
|