8 lines
467 B
JavaScript
8 lines
467 B
JavaScript
// Inlines the bundled engine into the prototype page.
|
|
import { readFileSync, writeFileSync } from "node:fs";
|
|
const dir = new URL(".", import.meta.url);
|
|
const src = readFileSync(new URL("src.html", dir), "utf8");
|
|
const engine = readFileSync(new URL("engine.js", dir), "utf8").replace(/<\/script/gi, "<\\/script");
|
|
writeFileSync(new URL("datewise-prototype.html", dir), src.replace("/*ENGINE*/", () => engine));
|
|
console.log("built prototype/datewise-prototype.html");
|