cargo run -- design-tokens < example-figma-files/design-tokens-for-figma.json
A design tokens generator inspired by the legacy output of the design-tokens Figma plugin.
The sub command is not recommended for use as it is missing large amounts of functionality when compared to the plugin.
Compare the goal output with the sub command's output:
# vscode
code --diff src/design_tokens/{design-tokens-goal.tokens.json,example-output.json}
# jq and diff
diff -y --color=always <(jq --sort-keys < src/design_tokens/design-tokens-goal.tokens.json) <(jq --sort-keys < src/design_tokens/example-output.json) | less -R
# jq and diff focussing on a particular type
diff -y --color=always <(jq --sort-keys .motion < src/design_tokens/design-tokens-goal.tokens.json) <(jq --sort-keys .motion < src/design_tokens/example-output.json) | less -R
Feature | Problems |
---|---|
General |
|
Sizes | No known issues |
Breakpoints | No known issues |
Spacing | No known issues |
Borders |
|
Radii | Smoothing isn't outputted (not present in the Figma API). |
Motions |
|
Opacities | No known issues |
Gradients | Tokens are categorised as colors instead of gradients. |
Colors |
|
Grid |
|
Font | Grid values aren't outputted (not present in the Figma API)! |
Effect |
|