// build:console 的第二步:把 vite-plugin-singlefile 产出的单文件 // 原样拷到可部署位置。绝不改动产物内容——以后改页面只改 src 再构建。 // 在本施工目录,目标是 ../console-redesign/console-react.html(主 agent // 审阅用);进仓库后,主 agent 把同一文件拷到 cloud/console.html。 import { copyFileSync, statSync } from "node:fs"; import { createHash } from "node:crypto"; import { readFileSync } from "node:fs"; import { dirname, join } from "node:path"; import { fileURLToPath } from "node:url"; const root = join(dirname(fileURLToPath(import.meta.url)), ".."); const src = join(root, "dist", "index.html"); const dest = join(root, "..", "console-redesign", "console-react.html"); copyFileSync(src, dest); const buf = readFileSync(dest); console.log(`console-react.html ${buf.length} bytes sha256=${createHash("sha256").update(buf).digest("hex")}`); console.log(`built: ${src} -> ${dest}`);