Skip to content

Commit

Permalink
Merge pull request #4286 from grommet/element-tokens
Browse files Browse the repository at this point in the history
Rename component tokens to element tokens
  • Loading branch information
taysea authored Oct 28, 2024
2 parents 1d7ca82 + ba29d3f commit 1e25fe2
Show file tree
Hide file tree
Showing 4 changed files with 911 additions and 912 deletions.
13 changes: 5 additions & 8 deletions design-tokens/src/scripts/build-style-dictionary.js
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,7 @@ HPEStyleDictionary.extend({
`${TOKENS_DIR}/semantic/global.default.json`,
`${TOKENS_DIR}/semantic/color.light.json`, // using light mode to have a reference name available
`${TOKENS_DIR}/semantic/dimension.large.json`, // using large mode to have a reference name available
`${TOKENS_DIR}/component/element.default.json`,
`${TOKENS_DIR}/component/component.default.json`,
],
platforms: {
Expand All @@ -299,8 +300,7 @@ HPEStyleDictionary.extend({
files: [
{
destination: 'components.default.js',
filter: token =>
token.filePath === `${TOKENS_DIR}/component/component.default.json`,
filter: token => token.filePath.includes(`${TOKENS_DIR}/component/`),
format: 'esmGrommetRefs',
},
],
Expand All @@ -312,8 +312,7 @@ HPEStyleDictionary.extend({
files: [
{
destination: 'components.default.cjs',
filter: token =>
token.filePath === `${TOKENS_DIR}/component/component.default.json`,
filter: token => token.filePath.includes(`${TOKENS_DIR}/component/`),
format: 'commonJsGrommetRefs',
},
],
Expand All @@ -326,8 +325,7 @@ HPEStyleDictionary.extend({
{
destination: 'components.css',
format: 'css/variables',
filter: token =>
token.filePath === `${TOKENS_DIR}/component/component.default.json`,
filter: token => token.filePath.includes(`${TOKENS_DIR}/component/`),
options: {
outputReferences: true,
},
Expand All @@ -341,8 +339,7 @@ HPEStyleDictionary.extend({
files: [
{
destination: 'components.js',
filter: token =>
token.filePath === `${TOKENS_DIR}/component/component.default.json`,
filter: token => token.filePath.includes(`${TOKENS_DIR}/component/`),
format: 'jsonFlat',
},
],
Expand Down
Loading

0 comments on commit 1e25fe2

Please sign in to comment.