Skip to content

Commit

Permalink
chore: clarify docs about sync feature (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
jorenbroekema authored Jun 15, 2022
1 parent c15ec16 commit a10f41a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ A utility that transforms a [style-dictionary](https://amzn.github.io/style-dict

Used by Design Systems in [Backlight](https://backlight.dev) using design tokens in [style-dictionary](https://amzn.github.io/style-dictionary/) that can be synced into Figma via the [Figma Tokens plugin](https://www.figma.com/community/plugin/843461159747178978).

> The tool, at the moment, assumes usage of the Sync feature of Figma Tokens Plugin.
> The JSON output is catered to this as it is a single file containing the tokensets information.
## Features

- Allows marking a category as a custom tokenset so that it will appear as a separate tokenset in Figma. This is useful if you want to combine many base tokens into a "global" set for example.
Expand Down Expand Up @@ -98,3 +101,11 @@ module.exports = {
This spits out a file `/tokens/tokens.json` which Figma Tokens plugin can import (e.g. through GitHub).

Since [Backlight](https://backlight.dev/) has [GitHub](https://github.com/) and [Style-Dictionary](https://amzn.github.io/style-dictionary/#/) integration out of the box, this process is very simple.

## Create a JSON for each tokenset

Perhaps you'd like to use this tool to generate a separate JSON file for each tokenset,
which you can then manually paste into the Figma Tokens Plugin JSON view.
For example, when you're not using the Figma Tokens Plugin Sync feature.

For this, [refer to this code snippet from this issue](https://github.com/divriots/style-dictionary-to-figma/issues/15#issuecomment-1127797022).
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit a10f41a

Please sign in to comment.