-
Notifications
You must be signed in to change notification settings - Fork 522
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
[Question] - Is there a way to not include default metadata when formatting in a JSON format? #727
Comments
Yeah, we're having the same issue. Currently running a custom script which is not ideal. An example for exporting to figma tokens format would be great! |
@phantasmagoriadigital Would you mind sharing your script? It may not be ideal, but could be very useful. |
@delisma I don't mind that, but let's connect because we're working on a solution with a few people. We're working on a better integration running through style dictionary, which should be done in a couple of days. If you can let me know how we can connect we can discuss the details of your requirement and probably come up with a solid solution. |
Here is a quick example that shows a couple different JSON formats, 2 built-in and 2 custom: https://stackblitz.com/edit/style-dictionary-example-3jm9xf?file=config.js Do any of those fit the output you are expecting? |
@dbanksdesign Thanks for the example, but it doesn't solve the problem. I need to do 2 things:
json output exampleOr just the values {} object would be fine too. |
@phantasmagoriadigital I think that if we adapt |
@delisma cool, I have also been working on this. @six7 sent me a script today that could help with some of the conversions. Will share them shortly. Here it is: |
Would like to remove the metadata as well.. |
Issue description
I was trying to build a JSON file for the Figma Tokens plugin written by @six7.
When a
name
property is declared for a token in the JSON file, I've noticed that the plugin use it for organizing the tokens with the type property. But when noname
property is included, the keys of the token is used instead.Current behaviour
When I use the pre-defined JSON transform I get this verbose data structure
This is generated from this
config.json
file:Expected behaviour
I would prefer Figma Tokens behaviour where the keys organize the tokens instead of the
name
property. But then I'm trying to not have the default metadata generated by SD and I can't seem to figure out how. I just need to output the JSON file like this:Screenshots
Default JSON file uploaded in Figma Tokens
Expected JSON file uploaded in Figma Tokens which might be more informative for designers
All that said, is this something that could be achieved with SD or should we investigate with Figma Tokens a way to prevent their default behaviour?
The text was updated successfully, but these errors were encountered: