0
Fork 0
mirror of https://github.com/penpot/penpot-exporter-figma-plugin.git synced 2025-01-03 13:20:37 -05:00
penpot-exporter-figma-plugin/src/plugin/transformers/transformDocumentNode.ts
Jordi Sala Morales 6c67200dc6
Move logic from UI to Code (#15)
* draft

* wip

* WIP

* fix group

* wip

* add todos

* fix

* fixes

* fixes

* image

* fix

* fix

* calculate adjustment

* text

* text

* improve texts

* fix

* gradient wip

* commented gradient

* simplify code

* cleanup

* more cleanup

---------

Co-authored-by: Alex Sánchez <sion333@gmail.com>
2024-04-12 13:55:42 +02:00

9 lines
346 B
TypeScript

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