🎉 Add wasm playground environment

This commit is contained in:
Alejandro Alonso 2025-04-30 07:35:17 +02:00 committed by Belén Albeza
parent 486f036a11
commit aae81b8a04
5 changed files with 222 additions and 0 deletions

View file

@ -573,3 +573,16 @@ export async function copyAssets() {
const end = process.hrtime(start);
log.info("done: copy assets", `(${ppt(end)})`);
}
export async function copyWasmPlayground() {
const start = process.hrtime();
log.info("init: copy wasm playground");
await syncDirs(
"resources/wasm-playground/",
"resources/public/wasm-playground/",
);
const end = process.hrtime(start);
log.info("done: copy wasm playground", `(${ppt(end)})`);
}

View file

@ -2,6 +2,7 @@ import * as h from "./_helpers.js";
await h.compileStyles();
await h.copyAssets();
await h.copyWasmPlayground();
await h.compileSvgSprites();
await h.compileTemplates();
await h.compilePolyfills();

View file

@ -44,6 +44,7 @@ async function compileSass(path) {
await fs.mkdir("./resources/public/css/", { recursive: true });
await compileSassAll();
await h.copyAssets();
await h.copyWasmPlayground();
await h.compileSvgSprites();
await h.compileTemplates();
await h.compilePolyfills();
@ -88,4 +89,10 @@ h.watch(
},
);
log.info("watch: wasm playground (~)");
h.watch(["resources/wasm-playground"], null, async function (path) {
log.info("changed:", path);
await h.copyWasmPlayground();
});
worker.terminate();