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

refactor(tokens): ♻️ Added color token type to references #1439

Merged
merged 3 commits into from
Feb 1, 2024
Merged
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,774 changes: 887 additions & 887 deletions apps/storefront/tokens/altinn.ts

Large diffs are not rendered by default.

1,702 changes: 851 additions & 851 deletions apps/storefront/tokens/brreg.ts

Large diffs are not rendered by default.

1,762 changes: 881 additions & 881 deletions apps/storefront/tokens/digdir.ts

Large diffs are not rendered by default.

1,658 changes: 829 additions & 829 deletions apps/storefront/tokens/tilsynet.ts

Large diffs are not rendered by default.

366 changes: 200 additions & 166 deletions packages/tokens/brand/altinn/tokens.css

Large diffs are not rendered by default.

382 changes: 208 additions & 174 deletions packages/tokens/brand/brreg/tokens.css

Large diffs are not rendered by default.

366 changes: 200 additions & 166 deletions packages/tokens/brand/digdir/tokens.css

Large diffs are not rendered by default.

358 changes: 196 additions & 162 deletions packages/tokens/brand/tilsynet/tokens.css

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions packages/tokens/scripts/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ const baseConfig = (brand: Brands): Partial<Config> => {

return {
include: [
`${tokensPath}/Base/Semantic.json`,
`${tokensPath}/Brand/${brand}.json`,
`${tokensPath}/Base/Semantic.json`,
],
source: [`${tokensPath}/Base/Core.json`],
};
Expand Down Expand Up @@ -121,7 +121,7 @@ const getTokensPackageConfig = (brand: Brands, targetFolder = ''): Config => {
fileHeader: fileheader.name,
referencesFilter: (token: TransformedToken) =>
!(token.path[0] === 'viewport') &&
['spacing', 'sizing'].includes(token.type as string),
['spacing', 'sizing', 'color'].includes(token.type as string),
// outputReferences: true,
},
},
Expand Down
1 change: 1 addition & 0 deletions packages/tokens/scripts/formatters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ export const scopedReferenceVariables: Named<Format> = {
fileHeader({ file }) +
':root {\n' +
' /** Referenced source tokens */ \n' +
' /** DO NOT OVERRIDE */ \n' +
referenceTokens.join('\n') +
'\n\n /** Tokens */ \n' +
tokens.join('\n') +
Expand Down
Loading