Consumes Figma Tokens JSON files, and outputs CSS.
You can, for example, hook Figma Tokens Sync feature up to a GitHub repo, and then have figma-token-parser
run in a GH action. Then on each update you get the updated CSS files outputted to a particular location. This would enable you to update styles in Figma, push changes from the UI, and have the updates automatically propagate to your live site/app/whatever.
This project is in a super-WIP state currently and probably won't work for you. It's only really guaranteed to work with Figma Tokens Pro, and if you use the "multiple files" option that splits your tokens into separate json files in directories instead of one huge json file. (see TODOs below.)
```bash yarn add -D figma-token-parser
yarn global add figma-token-parser ```
You can also install this package via Cargo
cargo install figma-token-parser
```bash
figma-token-parser --dir ./tokens --out ./build ```
@import
to include the relevant sets in one file.)@import
all of the individual sets per-theme with the option to include all, namespaced by a class name on :root
bash
rust-to-npm build
rust-to-npm deploy