-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DS: investigate syncing tokens to storybook #34
Comments
made a token, saved it in OnePassword. next will try adding github as a sync provider in the figma plugin (docs) |
tried syncing from the Getting Started file and got:
|
in PR #39, I think all tokens were synced despite my using the plugin with the Getting Started file open (a good thing) on to the step of Using Token Transformer |
since converting Figma exports to typescript files requires node packages, I created a branch in the streetscape repo called the approach in the article above uses two repos, but it seems like we can just export from figma to the streetscape repo and to reduce complexity so far the changes in that branch are:
the build scripts convert json exported from figma into formatted javascript/typescript/css/json. there are many built-in formats and it's pretty easy to define a custom format I think we'd need to configure a custom format if we want to mimic the current format of current tokens in streetscape |
per chat with Tyler:
next steps:
|
per chat with Damon about figma libraries and their relationship with design token plugin <> json, looking into figma's dev mode might be worth researching more about as design token automation syncing is currently blocked by obstacle of converting json to typescript |
Figma Dev Mode
Code Connect
Note Code connect is only available for Organization or Enterprise figma plans. Might be worth upgrading since it has compatibility with React and Storybook.
|
Update: all findings and next have been summarized in streetscape overview |
background
Originally posted by @damonmcc in #28
This DS work is inspired by this article.
High-level workflow:
Design + Dev flow [draft]
details
Important
Style Dictionary recently released version 4 and it's worth using this latest version. The documantation for v4 is here.
There's a package
@tokens-studio/sd-transforms
with custom transforms for Style-Dictionary, to work with Design Tokens that are exported from Tokens Studio (docs).Based on the current token files in the Streetscape repo, the most appropriate built-in Style Dictionary formats seem to be:
typescript/module-declarations
javascript/object
javascript/module
Filtering can be used to generate multiple files with different sets of tokens.
The text was updated successfully, but these errors were encountered: