Skip to content

Commit

Permalink
refactor: update StyleObject reference in formatter util.s
Browse files Browse the repository at this point in the history
  • Loading branch information
booc0mtaco committed Nov 20, 2024
1 parent a56d8d3 commit d606ee7
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions style-dictionary.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
formatEdsTokens,
} = require('./bin/_util');

console.log(StyleDictionary.transformGroup);

const EDSStyleDictionary = new StyleDictionary({
source: ['src/design-tokens/**/*.json'],
platforms: {
Expand Down Expand Up @@ -64,7 +62,7 @@
destination: 'lib/tokens/json/theme-base.json',
filter: function (token) {
// don't allow theming on legacy tokens
// TODO: remove filter once all legacy tokens are removed
// TODO(next-major): remove filter once all legacy tokens are removed
return token.attributes.category !== 'legacy';
},
},
Expand Down Expand Up @@ -93,7 +91,7 @@
name: 'json/tailwind-utility-config',
format: function ({ dictionary }) {
const minifiedCssDictionary = minifyDictionaryUsingFormat(
dictionary.properties,
dictionary.tokens,
(obj) => `${obj.value}`,
);
formatEdsTokens(minifiedCssDictionary);
Expand All @@ -114,7 +112,7 @@
name: 'json/value',
format: function ({ dictionary }) {
return JSON.stringify(
minifyDictionaryUsingFormat(dictionary.properties, (obj) => ({
minifyDictionaryUsingFormat(dictionary.tokens, (obj) => ({
value: obj.value,
})),
null,
Expand All @@ -123,5 +121,6 @@
},
});

// TODO: enable? await EDSStyleDictionary.cleanAllPlatforms();
await EDSStyleDictionary.buildAllPlatforms();
})();

0 comments on commit d606ee7

Please sign in to comment.