tokens-studio / sd-transforms

Custom transforms for Style-Dictionary, to work with Design Tokens that are exported from Tokens Studio
MIT License
194 stars 28 forks source link

[Feature]: Export json that can be used by Token Studio in Figma #179

Closed lloydrichards closed 9 months ago

lloydrichards commented 1 year ago

What feature would you like?

Correct me if i'm wrong, I'm looking for a way to to be able to be able to create templates for tokens in figma that designers will be able to work on and then connect to respective repositories to use style-dictionary in code. I've been trying to import tokens through the Tools menu in Token Studio in Figma but it only every imports a single json and with a very different file structure to what was originally there.

My request then is for a format for token-studio that would build out the json that can be given to designers so they can import the base token structure needed.

Would you be available to contribute this feature?

jorenbroekema commented 1 year ago

So if I understand correctly, you'd like to have something that essentially reverts everything that this package does, so that you can start with Design Tokens in "Style-Dictionary format" and then import as a single-file into Tokens Studio?

There is a package for this here https://github.com/divriots/style-dictionary-to-figma (@divriots/style-dictionary-to-figma) that does this, but it's been a long time since I last used it or did any maintainance, so I can't 100% promise that it ill still work as design tokens formats (including Tokens Studio) get adjusted over time. It does outline at least the conversion steps necessary with regards to tokensets, .value prop, etc.