import fs from 'node:fs';
import path from 'node:path';
export function writeStaticHtmlTemplate(targetDir, name) {
fs.mkdirSync(targetDir, { recursive: true });
fs.writeFileSync(path.join(targetDir, 'index.html'), `
${name}
${name}
Edit index.html, style.css, and script.js to get started.
`);
fs.writeFileSync(path.join(targetDir, 'style.css'), `:root {
color-scheme: light dark;
font-family: system-ui, sans-serif;
}
body {
margin: 0;
display: grid;
place-items: center;
min-height: 100vh;
}
main {
max-width: 40rem;
padding: 2rem;
text-align: center;
}
`);
fs.writeFileSync(path.join(targetDir, 'script.js'), `// Entry point for ${name}.
console.log('${name} loaded');
`);
return targetDir;
}
//# sourceMappingURL=staticHtml.js.map