Skip to content

Latest commit

 

History

History
218 lines (131 loc) · 4.89 KB

transform_groups.md

File metadata and controls

218 lines (131 loc) · 4.89 KB

Transform Groups

Transform Groups are a way to easily use multiple transforms at once. They are an array of transforms. You can define a custom transform group with the registerTransformGroup.

You use transformGroups in your config file under platforms > [platform] > transformGroup

{
  "source": ["properties/**/*.json"],
  "platforms": {
    "android": {
      "transformGroup": "android"
    }
  }
}

Pre-defined Transform groups

lib/common/transformGroups.js

web

Transforms:

attribute/cti name/cti/kebab size/px color/css


js

Transforms:

attribute/cti name/cti/pascal size/rem color/hex


scss

Transforms:

attribute/cti name/cti/kebab time/seconds content/icon size/rem color/css


css

Transforms:

attribute/cti name/cti/kebab time/seconds content/icon size/rem color/css


less

Transforms:

attribute/cti name/cti/kebab time/seconds content/icon size/rem color/hex


html

Transforms:

attribute/cti attribute/color name/human


android

Transforms:

attribute/cti name/cti/snake color/hex8android size/remToSp size/remToDp


ios

Transforms:

attribute/cti name/cti/pascal color/UIColor content/objC/literal asset/objC/literal size/remToPt font/objC/literal


ios-swift

Transforms:

attribute/cti name/cti/camel color/UIColorSwift content/swift/literal asset/swift/literal size/swift/remToCGFloat font/swift/literal


ios-swift-separate

Transforms:

attribute/cti name/ti/camel color/UIColorSwift content/swift/literal asset/swift/literal size/swift/remToCGFloat font/swift/literal

This is to be used if you want to have separate files per category and you don't want the category (e.g., color) as the lead value in the name of the property (e.g., StyleDictionaryColor.baseText instead of StyleDictionary.colorBaseText).


assets

Transforms:

attribute/cti


flutter

Transforms:

attribute/cti name/cti/camel color/hex8flutter size/flutter/remToDouble content/flutter/literal asset/flutter/literal font/flutter/literal


flutter-separate

Transforms:

attribute/cti name/ti/camel color/hex8flutter size/flutter/remToDouble content/flutter/literal asset/flutter/literal font/flutter/literal

This is to be used if you want to have separate files per category and you don't want the category (e.g., color) as the lead value in the name of the property (e.g., StyleDictionaryColor.baseText instead of StyleDictionary.colorBaseText).