Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): update dependency style-dictionary to v4 #2095

Open
wants to merge 3 commits into
base: next
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,210 changes: 605 additions & 605 deletions .storybook/data/tokens.json

Large diffs are not rendered by default.

12 changes: 7 additions & 5 deletions bin/eds-apply-theme.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env node
(async function () {
const StyleDictionary = require('style-dictionary');
const StyleDictionary = (await import('style-dictionary')).default;
const {
formatEdsTokens,
getConfig,
Expand All @@ -21,7 +21,7 @@

StyleDictionary.registerFormat({
name: 'json/tailwind-utility-config',
formatter: function (dictionary) {
format: function (dictionary) {
const minifiedCssDictionary = minifyDictionaryUsingFormat(
dictionary.properties,
(obj) => `${obj.value}`,
Expand All @@ -31,11 +31,11 @@
},
});

const EDSStyleDictionary = StyleDictionary.extend({
const EDSStyleDictionary = new StyleDictionary({
source: [config.src + 'app-theme.json'],
platforms: {
css: {
transforms: [...StyleDictionary.transformGroup.css, 'name/cti/kebab'],
transforms: [...StyleDictionary.transformGroup.css, 'name/kebab'],
buildPath: config.dest,
files: [
{
Expand Down Expand Up @@ -63,8 +63,10 @@
},
});

await EDSStyleDictionary.hasInitialized;

try {
EDSStyleDictionary.buildAllPlatforms();
await EDSStyleDictionary.buildAllPlatforms();
} catch (error) {
// TODO: if theme has things not in base, error showing where the conflict
console.error('EDS theming error:', error.message);
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
"react-popper": "^2.3.0",
"react-portal": "^4.2.2",
"react-uid": "^2.3.3",
"style-dictionary": "^3.9.2",
"style-dictionary": "^4.2.0",
"svg4everybody": "^2.1.9",
"ts-dedent": "^2.2.0",
"ts-morph": "^24.0.0",
Expand Down Expand Up @@ -187,7 +187,7 @@
"size-limit": "^8.2.6",
"standard-version": "^9.5.0",
"storybook": "^8.4.2",
"style-dictionary": "^3.9.2",
"style-dictionary": "^4.2.0",
"stylelint": "^16.10.0",
"stylelint-config-recommended": "^14.0.1",
"tailwindcss": "^3.4.14",
Expand Down
1,644 changes: 822 additions & 822 deletions src/tokens-dist/css/variables.css

Large diffs are not rendered by default.

Loading
Loading