13 lines
444 B
JavaScript
13 lines
444 B
JavaScript
import fs from "node:fs";
|
|
import path from "node:path";
|
|
|
|
const rootDir = path.resolve(path.dirname(new URL(import.meta.url).pathname), "..");
|
|
const distDir = path.resolve(rootDir, "dist");
|
|
fs.mkdirSync(distDir, { recursive: true });
|
|
|
|
for (const file of ["index.html", "styles.css", "app.mjs", "runtime.mjs"]) {
|
|
fs.copyFileSync(path.resolve(rootDir, file), path.resolve(distDir, file));
|
|
}
|
|
|
|
console.log(`hwlab-cloud-web build ok: ${distDir}`);
|