13 lines
512 B
JavaScript
13 lines
512 B
JavaScript
import { mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
import { dirname, resolve } from "node:path";
|
|
import { fileURLToPath } from "node:url";
|
|
|
|
const root = resolve(dirname(fileURLToPath(import.meta.url)), "..");
|
|
const indexHtml = readFileSync(resolve(root, "dist", "index.html"), "utf8");
|
|
|
|
const moreDir = resolve(root, "dist", "more");
|
|
mkdirSync(moreDir, { recursive: true });
|
|
writeFileSync(resolve(moreDir, "index.html"), indexHtml);
|
|
|
|
console.log("Copied dist/index.html -> dist/more/index.html");
|