@oub/fusion-design-tokens
v0.1.1
Published
This package is supposed to be used together with the [Design Tokens plugin for Figma](https://github.com/lukasoppermann/design-tokens). It transforms the exported design tokens using [Amazon style dictionary](https://amzn.github.io/style-dictionary/#/).
Readme
Fusion Design Token Transformer
This package is supposed to be used together with the Design Tokens plugin for Figma. It transforms the exported design tokens using Amazon style dictionary.
Installation
1. Install dependencies
- From within the terminal
cd(navigate) this folder. - Run
npm ito install the dependencies.
Usage
Local transformation
To use an exported json file and transform it locally on your machine, follow the 3 steps below:
- Save the
.jsonfile you exported using the Design Token plugin to thetokensfolder (and remove the example files). - In the terminal
cd(navigate) to this folder. - Run
npm run transform-tokens. - 🎉 Your converted tokens should be in the build folder.
Option 2: Transformation using Figma
1. Add repo url & access token to plugin settings
In the plugin settings you need to add two items:
- Add the url to your repository in the format
https://api.github.com/repos/:username/:repo/dispatchesto theserver-urlfield (See server-url for details) - Add the personal access token to the access token field.
2. Run the Send Design Tokens to Url command from the plugin.
3. You are done.
You should be able to see the action running in your GitHub repo and have all the converted files in the build folder once it is done.
