RedMadRobot / figma-export

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

Add prefix filter for light/dark modes #218

Open fedulvtubudul opened 9 months ago

fedulvtubudul commented 9 months ago

Our designer ~uses variable modes~ for light and dark modes. Nope, actually we have both variable modes AND color styles, and it seems to be irrelevant to this exact proposal.

figma-export sees these colours like this (breakpoint inside loadColorsFromSingleFile method):

(lldb) print colors.map({ $0.name }).sorted()
([String]) $R1 = 66 values {
  [0] = "dark-theme/accent-01"
  [1] = "dark-theme/accent-02"
  [2] = "dark-theme/accent-03"
...
  [33] = "light-theme/accent-01"
  [34] = "light-theme/accent-02"
  [35] = "light-theme/accent-03"
...

So I assume adding a new parameter so that we can filter resources not only by suffix, but by prefix as well.

fedulvtubudul commented 3 months ago

@subdan please check the PR #235 i've done regarding this request.