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

Support exporting colors from a single figma file #67

Closed JonLz closed 3 years ago

JonLz commented 3 years ago

Resolves #66

Adds two configuration options to the common:colors: portion of the yaml file. When useSingleFile is true, it will only read from the lightFileId specified in the figma options. It will look for dark colors as specified by a color style ending in _dark (configurable via the darkModeSuffix config option).

I wasn't able to write a test for this as the ColorsLoader is hard-wired to hit the Figma API, but I updated the docs and tested things out on my end.

JonLz commented 3 years ago

Thank you for reviewing the PR. I've added your suggestions.