0
Fork 0
mirror of https://github.com/penpot/penpot-exporter-figma-plugin.git synced 2024-12-23 06:04:01 -05:00
penpot-exporter-figma-plugin/plugin-src/messageHandlers/handleExportMessage.ts

9 lines
274 B
TypeScript
Raw Normal View History

import { transformDocumentNode } from '@plugin/transformers';
2024-04-09 04:23:06 -05:00
export async function handleExportMessage() {
await figma.loadAllPagesAsync();
const penpotNode = await transformDocumentNode(figma.root);
figma.ui.postMessage({ type: 'FIGMAFILE', data: penpotNode });
2024-04-09 04:23:06 -05:00
}