Skip to content

Commit

Permalink
Merge pull request #27 from gsoft-inc/feat/token-json-rename
Browse files Browse the repository at this point in the history
fix: Rename the token key on camelCase
  • Loading branch information
vicky-comeau authored Nov 8, 2022
2 parents 4a2443c + 5c76f91 commit 606410d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/wise-numbers-act.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@igloo-ui/tokens': major
---

BRAKING CHANGE Rename the tokens key on camelCase
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ dist

# Stores VSCode versions used for testing VSCode extensions
.vscode-test
.idea

# yarn v2
.yarn/cache
Expand Down
4 changes: 3 additions & 1 deletion build.js
Original file line number Diff line number Diff line change
@@ -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('');

Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 606410d

Please sign in to comment.