Something went wrong. Try again.
Something went wrong. Try again.
codebeam-eu-2026 vendor.mjs
881 B · 26 lines
JavaScript
at main
123456789101112131415161718192021222324252627#!/usr/bin/env node/* Copy the bits of node_modules the deck loads directly into the tree. Keeps index.html free of bundlers: run once after `npm install`, then the deck is a plain static directory. */
import { cp, mkdir, rm } from "node:fs/promises";import { dirname, join, resolve } from "node:path";
const ROOT = resolve(import.meta.dirname);const MODULES = join(ROOT, "node_modules");
const TARGETS = [ { from: "animejs/dist/bundles/anime.umd.min.js", to: "vendor/anime.umd.min.js" }, { from: "reveal.js/dist", to: "vendor/reveal" }, { from: "reveal.js/plugin", to: "vendor/plugin" },];
for (const { from, to } of TARGETS) { const dest = join(ROOT, to);
await rm(dest, { force: true, recursive: true }); await mkdir(dirname(dest), { recursive: true }); await cp(join(MODULES, from), dest, { recursive: true });
console.log(`vendored ${to}`);}