mirror of
https://github.com/penpot/penpot.git
synced 2025-12-11 22:14:05 +01:00
🎉 Add wasm playground environment
This commit is contained in:
committed by
Belén Albeza
parent
486f036a11
commit
aae81b8a04
@@ -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)})`);
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user