amzn / style-dictionary

A build system for creating cross-platform styles.
https://styledictionary.com
Apache License 2.0
3.94k stars 559 forks source link

Transforms config API improvements #1266

Open jorenbroekema opened 4 months ago

jorenbroekema commented 4 months ago

Before:

{
  platforms: {
    css: {
      transformGroup: 'css',
      transforms: ['name/kebab'],
      basePxFontSize: 14,
      files: [{}]
    }
  }
}

After:

{
  platforms: {
    css: {
      transformGroups: ['css'], // allow multiple
      transforms: ['name/kebab'],
      transformOptions: {
        basePxFontSize: 14,
      },
      files: [{}]
    }
  }
}

Up for discussion of course, just wanted to document the idea and track for v5