import * as fs from 'fs'; const svgContent = fs.readFileSync('public/logo-white.svg', 'utf8'); const dMatches = [...svgContent.matchAll(/d="([^"]+)"/g)].map((m) => m[1]); let tsx = `import React from 'react';\nimport { Svg, G, Path } from '@react-pdf/renderer';\n\n`; tsx += `export const KLZLogoVector = ({ width, color }: { width: number, color: string }) => {\n`; tsx += ` // Original viewBox was 0 0 295 99, so height is width * 99 / 295\n`; tsx += ` const height = width * (99 / 295);\n`; tsx += ` return (\n`; tsx += ` \n`; tsx += ` \n`; for (const d of dMatches) { tsx += ` \n`; } tsx += ` \n \n );\n};\n`; fs.writeFileSync('lib/KLZLogoVector.tsx', tsx); console.log('Generated KLZLogoVector.tsx');