mirror of
https://github.com/penpot/penpot.git
synced 2025-08-04 00:49:02 +02:00
🎉 Add support for progress reporting to library export method
This commit is contained in:
parent
27d2724153
commit
644dd9ff44
4 changed files with 79 additions and 23 deletions
|
@ -80,7 +80,11 @@ import { Writable } from "stream";
|
|||
}
|
||||
|
||||
{
|
||||
let result = await penpot.exportAsBytes(context);
|
||||
const onProgress = (opts) => {
|
||||
console.log(`Procesing ${opts.item}/${opts.total}: ${opts.path}`);
|
||||
};
|
||||
|
||||
let result = await penpot.exportAsBytes(context, {onProgress});
|
||||
await writeFile("sample-sync.zip", result);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue