-
Notifications
You must be signed in to change notification settings - Fork 31
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
Possible bug with parsing Token Studio file #171
Comments
Ah hm. The auto-detection of Tokens Studio format kicks in whenever there’s a There might need to be some other way to detect a Tokens Studio format file from DTFM, because it’s still important that DTFM errors are validated and thrown (which is the error you’re seeing now—it’s trying to say it’s invalid DTFM). So ideally we have one of the following solutions:
|
I checked my file for |
But I still think you should update with one of the proposed solutions to force reading the json as a token studio file. I noticed that if you don't check the "All token sets" option on export, it doesn't export the |
That’s great insight, thank you! Admittedly, I don’t have access to a really robust Tokens Studio project; I’ve just been testing it on more “examples.” And sorry you had to run into a rough edge, but that’s helpful info not only for docs, but parsing as well. After thinking about it a bit, I’m still not sure how I want to solve the syntax warning here. Perhaps the error message should change to something along the lines of:
(obviously assuming a There’s another entire possibility I’m considering where Cobalt has more configurable/pluggable parsers, but that would be a different direction for this library, and is beside the point of this issue. Bare-minimum, I am interested in supporting Tokens Studio well in the core library. And short-term am committed to the DTCG format. But will keep an open mind when it comes to how people are using/consuming design tokens as more and more people jump on this bandwagon. |
Improved parsing of Tokens Studio files, but I’m still a bit hesitant to add the |
I have loaded up the example Token Studio file that is included in the plugin (also on their repo here), however I'm getting some errors, which I'm guessing is likely due to the way the object is nested? The error is
scale: missing $type
Is this a bug?
The text was updated successfully, but these errors were encountered: