Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow passing additionalTransforms to registerTransforms #66

Closed
jorenbroekema opened this issue Mar 23, 2023 · 1 comment · Fixed by #175
Closed

Allow passing additionalTransforms to registerTransforms #66

jorenbroekema opened this issue Mar 23, 2023 · 1 comment · Fixed by #175
Labels
enhancement New feature or request

Comments

@jorenbroekema
Copy link
Member

registerTransforms(StyleDictionary, { additionalTransforms: ['name/cti/kebab'] });

Since you can't combine transformGroup + transforms, it's not really easy to do it yourself... you would need to resort to:

{
  "platforms": {
    "css": {
      "transforms": [
        "ts/descriptionToComment",
        "ts/resolveMath",
        "ts/size/px",
        "ts/size/letterspacing",
        "ts/size/lineheight",
        "ts/type/fontWeight",
        "ts/color/hexrgba",
        "ts/color/modifiers",
        "ts/typography/css/shorthand",
        "ts/shadow/shorthand",
        "name/cti/kebab"
      ],
      "buildPath": "build/css/",
      "files": [
        {
          "destination": "_variables.css",
          "format": "css/variables"
        }
      ]
    }
  }
}

See also:
amzn/style-dictionary#813

@jorenbroekema
Copy link
Member Author

Handled by #175 , at least for casing. For changing transforms in a different way, refer to https://github.com/tokens-studio/sd-transforms#custom-transform-group

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant