tsimenis / figma-export-icons

Uses the Figma REST api to export svg icons into your project
MIT License
54 stars 24 forks source link

add ability to pass the path to frame if it is nested within groups #8

Closed pbilyk closed 3 years ago

pbilyk commented 3 years ago

I ran into an issue when we started implementing the atomic design principles on our project and grouped our frames by levels.

This resulted in the icon export tool breaking because the Icons frame was now not a direct descendant of a page, but a child in the 'atoms' group.

With this pull request, I propose a solution: we add the possibility to specify the frame path within a page by adding the following option to icons-config.json:

{ ... "pathToFrame": "path/to/frame" }

And the code added to cli.js should take care of navigating the page down to the specified path.