lukasoppermann / design-tokens

🎨 Figma plugin to export design tokens to json in an amazon style dictionary compatible format.
https://www.figma.com/community/plugin/888356646278934516/Design-Tokens
MIT License
953 stars 131 forks source link

Last component of variable names are always exported in lowercased #310

Open mobrien-ghost opened 2 months ago

mobrien-ghost commented 2 months ago

Context:

We have variables for spacing and colors etc where the last component/portion of the variable name is camelCased.

For example

Issue:

when exported, the keys are all lower cased:

    "tokens-spacing": {
      "spacing": {
        "extraextrasmall": {
          "type": "dimension",
          "value": "{primitives.mode 1.digits.4}"
        },
        "extrasmall": {
          "type": "dimension",
          "value": "{primitives.mode 1.digits.8}"
        },
        ...
    "tokens-colour": {
      "dark": {
        "alert": {
          "safety": {
          "mentalhealth": {
              "type": "color",
                "value": "{primitives.dark.colours.yellow.01}"
          }

Expected:

was expecting them to be:

    "tokens-spacing": {
      "spacing": {
        "extraExtraSmall": {
          "type": "dimension",
          "value": "{primitives.mode 1.digits.4}"
        },
        "extraSmall": {
          "type": "dimension",
          "value": "{primitives.mode 1.digits.8}"
        },
        ...
    "tokens-colour": {
      "dark": {
        "alert": {
          "safety": {
          "mentalHealth": {
              "type": "color",
                "value": "{primitives.dark.colours.yellow.01}"
          }