const fs = require('fs');
const path = require('path');
const srcDir = path.join(__dirname, 'src');
const distDir = path.join(__dirname, 'dist');
if (!fs.existsSync(distDir)) {
fs.mkdirSync(distDir, { recursive: true });
}
// Simple build: copy static assets and generate index.html
const indexHtml = `
Signal Ledger
Welcome to Signal Ledger — a subsidiary of Jopdorp.
`;
fs.writeFileSync(path.join(distDir, 'index.html'), indexHtml);
// Copy style.css if it exists
const styleSrc = path.join(srcDir, 'style.css');
const styleDest = path.join(distDir, 'style.css');
if (fs.existsSync(styleSrc)) {
fs.copyFileSync(styleSrc, styleDest);
} else {
fs.writeFileSync(styleDest, `body{font-family:system-ui,sans-serif;margin:0;padding:2rem;background:#0b0c10;color:#c5c6c7}header{border-bottom:1px solid #45a29e;padding-bottom:1rem;margin-bottom:2rem}h1{color:#66fcf1;margin:0}.tagline{color:#45a29e}footer{margin-top:4rem;padding-top:1rem;border-top:1px solid #45a29e;font-size:.875rem;color:#45a29e}`);
}
console.log('Build complete: dist/');