diff --git a/lib/build-tokens.js b/lib/build-tokens.js index e0f1a7f689..3e10b37593 100755 --- a/lib/build-tokens.js +++ b/lib/build-tokens.js @@ -34,7 +34,7 @@ async function buildTokensCommand(commandArgs) { const { 'build-dir': buildDir, source: tokensSource, - 'source-tokens-only': hasSourceTokensOnly, + 'source-tokens-only': transformSourceTokensOnly, 'output-references': outputReferences, themes, verbose, @@ -74,7 +74,7 @@ async function buildTokensCommand(commandArgs) { { format: 'css/custom-variables', destination: 'core/variables.css', - filter: hasSourceTokensOnly ? 'isSource' : undefined, + filter: transformSourceTokensOnly ? 'isSource' : undefined, options: { outputReferences, }, @@ -82,7 +82,7 @@ async function buildTokensCommand(commandArgs) { { format: 'css/custom-media-breakpoints', destination: 'core/custom-media-breakpoints.css', - filter: hasSourceTokensOnly ? 'isSource' : undefined, + filter: transformSourceTokensOnly ? 'isSource' : undefined, options: { outputReferences, }, @@ -121,7 +121,7 @@ async function buildTokensCommand(commandArgs) { { format: 'css/custom-variables', destination: `themes/${themeVariant}/variables.css`, - filter: hasSourceTokensOnly + filter: transformSourceTokensOnly ? `isSource.${themeVariant}` : `isThemeVariant.${themeVariant}`, options: { @@ -131,7 +131,7 @@ async function buildTokensCommand(commandArgs) { { format: 'css/utility-classes', destination: `themes/${themeVariant}/utility-classes.css`, - filter: hasSourceTokensOnly ? 'isSource' : undefined, + filter: transformSourceTokensOnly ? 'isSource' : undefined, options: { outputReferences, },