mirror of
https://github.com/penpot/penpot.git
synced 2025-12-11 22:14:05 +01:00
🎉 Add support for progress reporting to library export method
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user