0.0.4 ā¢ Published 7 months ago
gyldendal-tokens v0.0.4
Design tokens
ā” Quick how to: update tokens
- Export json from Figma
- Replace json in
tokens-from-figma.json
- Run
yarn tokens
- Commit changes
š§± Token folder structure
/
āāā output/
ā āāā tokens.css
ā āāā tokens.less
ā āāā tokens.scss
ā āāā tokens.js
ā āāā token.json
āāā build.js
āāā config.js
āāā tokens-from-figma.json
We use style-dictionary to transform and format the tokens in ./tokens-from-figma.json
.
In ./config.js
we decide which formats we want (css, scss, js and more), and in ./build.js
we can create formatters and use other utilities to change the output how we want.
The files in ./output
are auto generated and should never be edited manually.