stage 8-step viewer
Build and Push Docker Image / build (push) Successful in 1m15s

This commit is contained in:
jason
2026-04-21 13:26:48 -05:00
parent 5847a175af
commit 76308b8aa3
9 changed files with 603 additions and 2 deletions
+36
View File
@@ -0,0 +1,36 @@
// Copies vendor assets that need to ship in `public/` so they can be fetched
// at runtime (wasm, etc). Run via npm pre-hooks — see package.json.
import { copyFile, mkdir, access } from "node:fs/promises";
import { dirname, join } from "node:path";
import { fileURLToPath } from "node:url";
const __dirname = dirname(fileURLToPath(import.meta.url));
const ROOT = join(__dirname, "..");
const copies = [
{
from: "node_modules/occt-import-js/dist/occt-import-js.wasm",
to: "public/vendor/occt-import-js.wasm",
},
];
async function main() {
for (const { from, to } of copies) {
const src = join(ROOT, from);
const dest = join(ROOT, to);
try {
await access(src);
} catch {
console.warn(`[copy-viewer-assets] missing: ${from} — did npm install run?`);
continue;
}
await mkdir(dirname(dest), { recursive: true });
await copyFile(src, dest);
console.log(`[copy-viewer-assets] ${from}${to}`);
}
}
main().catch((err) => {
console.error("[copy-viewer-assets] failed:", err);
process.exit(1);
});