I'm experiencing an issue when I reference tokens in the measures.json file.
In my solution I generate some global tokens where I reference tokens from the measures.json file.
I use the style-dictionary npm package (https://github.com/amzn/style-dictionary) to transform the tokens to CSS.
The exporter's JSON format wraps token values in a value property, which breaks the reference logic in the style-dictionary package. The logic looks for a value property in the reference path to the token (ex. {measure.dimension.space.spacing-none.value.measure.value}), and deletes the property.
Because the value property is deleted, the reference to the token breaks, so the build fails.
In the exporter code, would it be possible to change the wrapper property name here:
{
"measure": {
"dimension": {
"space": {
"spacing-00": {
"values": {
"measure": {
"type": "size",
"value": 0
},
"unit": {
"type": "string",
"value": "pixels"
}
},
"type": "measure"
},
"spacing-01": {
"values": {
"measure": {
"type": "size",
"value": 2
},
"unit": {
"type": "string",
"value": "pixels"
}
},
"type": "measure"
}
I hope that the explanation is clear enough.
If not, let me know.