Closed cailborg closed 9 months ago
Interesting. Thanks for feedback @cailborg I'll check it out. Which version of Style Dictionary do you use?
Just latest
at the moment, so 3.8.0
Thank, and for which platform, CSS? I'll check it in the morning 🙂
Yep CSS and SCSS
Should work fine, without value
at the end. I've checked a test JSON file with Style Dictionary playground — here is a link
Looks like the reason in something else.
Also, I made Style Dictionary utils package. So, you can try to transform your tokens with it — https://github.com/tokens-bruecke/sd-utils
Here is a test repo with Github Actions — https://github.com/tokens-bruecke/tokens-deploy-with-actions
I made a custom build. In this build, the plugin will add .value
at the end of the alias string.
Can you check if it works for you?
Also, might be the reason in this:
"$value": "{base.primary.yellow.value}"
that you're using DTCG format $value
Added value
or $value
(if it's the DTCG
format) at the end of the alias paths.
@PavelLaptev wouldn't it be more appropriate for this change to live in the style dictionary utils? The alias example provided by the spec does not append value
to the end of an alias. Cobalt's (a DTCG parser) example matches the spec. Style dictionary is the only place I've seen so far where value
is appended.
@dev-nicolaos thank you for your feedback. I think you're right. I'll leave adding value
at the end of an alias optional.
@dev-nicolaos updated. It's now optional
I've noticed your plugin adds the alias for a token as
When you try to resolve aliases in style dictionary i'm getting a blank output file
Should the plugin output an alias path the same as the style dictionary example?