Skip to content

Commit

Permalink
adding display overrides for dark and light HC
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasoppermann committed Feb 6, 2025
1 parent 4fdd0ff commit a649325
Show file tree
Hide file tree
Showing 5 changed files with 730 additions and 897 deletions.
9 changes: 7 additions & 2 deletions scripts/combineThemes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,17 @@ interface Theme {
[key: string]: unknown
}

function combineThemes(baseFilePath: string, overrideFilePath: string, outputFilePath: string): void {
function combineThemes(
baseFilePath: string,
overrideFilePath: string,
outputFilePath: string,
themeName?: string,
): void {
const baseFile = JSON5.parse(readFileSync(baseFilePath, 'utf8'))
const overrideFile = JSON5.parse(readFileSync(overrideFilePath, 'utf8'))
const overrideFileName = basename(overrideFilePath, extname(overrideFilePath)).replace(/\./g, '-')

const combinedTheme = combine(baseFile, overrideFile, overrideFileName)
const combinedTheme = combine(baseFile, overrideFile, themeName || overrideFileName)

writeFileSync(outputFilePath, JSON5.stringify(combinedTheme, null, 2))
}
Expand Down
2 changes: 0 additions & 2 deletions scripts/themes.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ export const themes: TokenBuildInput[] = [
`src/tokens/component/*.json5`,
`src/tokens/functional/color/*.json5`,
`src/tokens/functional/color/light/*.json5`,
`src/tokens/functional/color/light/overrides/light.high-contrast.json5`,
],
include: [
`src/tokens/functional/size/border.json5`,
Expand Down Expand Up @@ -145,7 +144,6 @@ export const themes: TokenBuildInput[] = [
`src/tokens/component/*.json5`,
`src/tokens/functional/color/*.json5`,
`src/tokens/functional/color/dark/*.json5`,
`src/tokens/functional/color/dark/overrides/dark.high-contrast.json5`,
],
include: [
`src/tokens/functional/size/border.json5`,
Expand Down
351 changes: 0 additions & 351 deletions src/tokens/functional/color/dark/overrides/dark.high-contrast.json5

This file was deleted.

Loading

0 comments on commit a649325

Please sign in to comment.