UNPKG

clumsy-graphics

Version:

a tool for rapidly developing animations where frames are described using svg elements à la react 🙃

20 lines (19 loc) 720 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getAnimationModuleBundle = void 0; const esbuild_1 = require("esbuild"); async function getAnimationModuleBundle(api) { const { animationModulePath } = api; const animationModuleBuildResult = await (0, esbuild_1.build)({ absWorkingDir: process.cwd(), entryPoints: [animationModulePath], bundle: true, platform: 'node', format: 'iife', globalName: 'animationModule', write: false, }); const animationModuleBundle = animationModuleBuildResult.outputFiles[0].text; return { animationModuleBundle }; } exports.getAnimationModuleBundle = getAnimationModuleBundle;