const fs = require('fs'); const path = require('path'); const distDir = path.join(__dirname, 'dist'); // Run build first if dist doesn't exist if (!fs.existsSync(distDir)) { require('./src/build.js'); } const indexPath = path.join(distDir, 'index.html'); if (!fs.existsSync(indexPath)) { console.error('FAIL: dist/index.html not found'); process.exit(1); } const html = fs.readFileSync(indexPath, 'utf8'); const checks = [ ['title', html.includes('