0
Fork 0
mirror of https://github.com/penpot/penpot-exporter-figma-plugin.git synced 2025-01-03 05:10:13 -05:00
penpot-exporter-figma-plugin/plugin-src/transformers/transformDocumentNode.ts
Alex Sánchez 5d4ace337b
Components Library (#125)
* components library management

* components library management

* fixes

* fixes
2024-05-29 17:33:29 +02:00

13 lines
409 B
TypeScript

import { componentsLibrary } from '@plugin/ComponentLibrary';
import { PenpotDocument } from '@ui/types';
import { transformPageNode } from '.';
export const transformDocumentNode = async (node: DocumentNode): Promise<PenpotDocument> => {
return {
name: node.name,
children: await Promise.all(node.children.map(child => transformPageNode(child))),
components: componentsLibrary.all()
};
};