diff --git a/.changeset/wise-numbers-act.md b/.changeset/wise-numbers-act.md new file mode 100644 index 0000000..e17ad1e --- /dev/null +++ b/.changeset/wise-numbers-act.md @@ -0,0 +1,5 @@ +--- +'@igloo-ui/tokens': major +--- + +BRAKING CHANGE Rename the tokens key on camelCase diff --git a/.gitignore b/.gitignore index 7b59bb1..62dbc51 100644 --- a/.gitignore +++ b/.gitignore @@ -109,6 +109,7 @@ dist # Stores VSCode versions used for testing VSCode extensions .vscode-test +.idea # yarn v2 .yarn/cache diff --git a/build.js b/build.js index cc1642f..99ad217 100644 --- a/build.js +++ b/build.js @@ -1,6 +1,7 @@ import fs from 'fs'; import path from 'path'; import StyleDictionary from 'style-dictionary'; +import camelcase from 'camelcase'; const dirname = path.dirname(''); @@ -67,7 +68,8 @@ StyleDictionary.registerFormat({ const result = {}; dictionary.allTokens.map((token) => { - result[token.name] = token.value; + const tokenName = camelcase(token.name); + result[tokenName] = token.value; }); return JSON.stringify(result, null, 2);