tokens-studio / sd-transforms

Custom transforms for Style-Dictionary, to work with Design Tokens that are exported from Tokens Studio
MIT License
185 stars 28 forks source link

[Bug]: Warnings that reference not found during parsing typography #218

Closed Vampire2008 closed 9 months ago

Vampire2008 commented 10 months ago

What happened?

I have typography tokens that has refeneces. But references in another file.

{
  "token": {
    "value": {
      "fontFamily": "{sans-serif}",
      "fontWeight": "{font-weight.400}",
      "lineHeight": "{line-height.m}",
      "fontSize": "{font-size.xs}",
      "letterSpacing": "{letter-spacing.normal}",
      "paragraphSpacing": "",
      "textCase": "{text-transform.normal}",
      "textDecoration": ""
    },
    "type": "typography",
    "description": "Font size – 12px"
  }
}

When I run building I got many warnings in console: Warning: could not resolve reference {font-weight.400}

Reproduction

Create two files. One with typography tokens where fontWeight uses reference. Second file with references.

Expected output

No warnings because reference exists.

Version

0.11.9

jorenbroekema commented 10 months ago

Seems like a duplicate of https://github.com/tokens-studio/sd-transforms/issues/217

Can you confirm that this only happens when you set expand.typography to true?