)([\s\S]*?)(<\/div>)/,
(_m, open, inner, close) => open + inner.replace(/
/g, '') + close
);
await writeFile(path.join(SITE, 'obi.html'), html);
/* ---- shared assets ---- */
for (const file of CSS_FILES) {
await cp(path.join(ROOT, 'css', file), path.join(SITE, 'css', file));
}
for (const file of JS_FILES) {
await cp(path.join(ROOT, 'js', file), path.join(SITE, 'js', file));
}
await cp(path.join(ROOT, 'js', 'modules', 'makita_lxt.js'), path.join(SITE, 'js', 'modules', 'makita_lxt.js'));
await cp(path.join(ROOT, 'js', 'interfaces', 'arduino_obi.js'), path.join(SITE, 'js', 'interfaces', 'arduino_obi.js'));
await cp(path.resolve(__dirname, '..', 'serial-shim.js'), path.join(SITE, 'js', 'serial-shim.js'));
console.log(`OBI-only site prepared in ${SITE}`);