-
Notifications
You must be signed in to change notification settings - Fork 572
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
What is the correct setup for sketch palette? #313
Comments
Try adding "attribute/cti" as the first transform in the sketch platform. Also, could you show what your token file(s) look like? The "attribute/cti" adds an "attributes" object on each token and sets "category", "type", "item" based on the object path. Let me know if this makes sense! |
base.json looks like this:
I've added all the underscores being paranoid that was an issue. Output from adding the attribute/cti:
|
Okay weird, tested this morning and it does generate the palette however there are all of those warnings? |
Okay, fixed it. It was my names: The winning config:
Hopefully will help peeps in future and thanks for you help @dbanksdesign :) |
Awesome! Yea a bit about those warnings. When Style Dictionary tries to build a file it will check for name collisions in the format, name collisions could happen because maybe a name transform is causing names to be duplicated. In your case it was because you didn't have any name transform applied (my bad, I forgot that), and by default each token's name is its' key in the object. So having multiple keys of Here is the PR that added those warnings: #273 |
I've included an example. I have the files created with the init build, everything else works (removed my js outputs). I don't think the filter is working, but if someone has an example of sketch much appreciated :)
The text was updated successfully, but these errors were encountered: