evOo-local/apps/desktop/scripts/copy-static.mjs
cynarAI 6c7eed7580 Initial clean evOo-local from f00577b
Fresh history cut from cynarAI/evoo antigravity-handoff/project-timeline
(Voice First + project timeline). Brand docs/titles as evOo; keep @rakazo/*
packages as tech debt. Excludes node_modules, caches, secrets, voice blobs.
2026-09-20 17:15:16 +02:00

21 lines
837 B
JavaScript

import { copyFile, mkdir } from "node:fs/promises";
import path from "node:path";
import { fileURLToPath } from "node:url";
// tsc only emits the TypeScript sources; the preload bridges and the setup
// window's static assets have to be copied into dist alongside them.
const STATIC_FILES = ["preload.cjs", "setup-preload.cjs", "setup.html", "setup.css", "setup.js"];
const TOKENS_FILE = path.resolve(
path.dirname(fileURLToPath(import.meta.url)),
"../../../packages/ui-tokens/src/tokens.css",
);
const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..");
const dist = path.join(root, "dist");
await mkdir(dist, { recursive: true });
await Promise.all([
...STATIC_FILES.map((file) => copyFile(path.join(root, "src", file), path.join(dist, file))),
copyFile(TOKENS_FILE, path.join(dist, "tokens.css")),
]);