0.1.1 • Published 7 months ago
@oub/fusion-design-tokens v0.1.1
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 i
to 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
.json
file you exported using the Design Token plugin to thetokens
folder (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:
1. Add the url to your repository in the format https://api.github.com/repos/:username/:repo/dispatches
to the server-url
field (See server-url for details)
2. 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.