amzn / style-dictionary

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

Associate or transform key names #996

Closed PavelLaptev closed 6 months ago

PavelLaptev commented 1 year ago

In my design tokens file, I have keys like $value instead of just value. Is there a way ho I can tell to Style Dictionary that $value is value?

fALKENdk commented 1 year ago

Have a look here: w3c-token-json-parser.ts

@lukasoppermann also wrote an article about that: W3C Design Tokens with Style Dictionary

PavelLaptev commented 1 year ago

Thank you @fALKENdk that's really helpful

jorenbroekema commented 6 months ago

W3C support added to v4 branch, so you can use it without needing a custom parser