mirror of
https://github.com/penpot/penpot.git
synced 2025-05-21 18:16:09 +02:00
🎉 Add wasm playground environment
This commit is contained in:
parent
486f036a11
commit
aae81b8a04
5 changed files with 222 additions and 0 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue