RedMadRobot / figma-export

Command line utility to export colors, typography, icons and images from Figma to Xcode / Android Studio project
MIT License
726 stars 114 forks source link

[Question] Support multiple pages #70

Closed SergeyKovalenko closed 3 years ago

SergeyKovalenko commented 3 years ago

Thank you for such a great tool? It saves a ton of time.

I have a couple of questions:

image

subdan commented 3 years ago

Hi. Thanks.

Is it possible to import assets from different pages? Is there any way to specify a page for import in the config file?

No. You can specify only common.icons.figmaFrameName and common.images.figmaFrameName options. All the icons/images must be placed in a single frame on a single page.

Do you have any requirements on how the Figma frame should be named? For example, "Body status emoji", is it a valid name?

If you export icons (figma-export icons) and do not specify custom frame name, frame must be named "Icons". If you export images (figma-export images) and do not specify custom frame name, frame must be named "Illustrations". See example in the Figma example file here. You can set custom frame name in the config file. See common.icons.figmaFrameName and common.images.figmaFrameName.

SergeyKovalenko commented 3 years ago

We have two frames with icons "Icon" and "Body status" on the different pages.
When I specify custom figmaFrameName Icon everything works like a charm. But when I change it to figmaFrameName Body status i see Components not found in the Figma file. Have you published Components to the Library? That's why am I wondering maybe it depends on the page name, since Icon frame, and Body status added to different pages. Is it possible to specify custom frame name with whitespaces (e.g. "My Icons")?

subdan commented 3 years ago

But when I change it to figmaFrameName Body status i see Components not found in the Figma file. Have you published Components to the Library?

It must works. I've checked it.

common:
  icons:
    figmaFrameName: Body status
Screen Shot 2021-02-12 at 14 12 57

That's why am I wondering maybe it depends on the page name, since Icon frame, and Body status added to different pages.

No. I've checked. I moved "Body status" frame to "Page 2" and it still works.

Is it possible to specify custom frame name with whitespaces (e.g. "My Icons")?

Yes.

SergeyKovalenko commented 3 years ago

Got it. Thank you!

subdan commented 3 years ago

Cool! If you will have any questions feel free to contact me.