Skip to content

Commit

Permalink
fix(plasma-theme-builder): Add resoterd color methods for generate th…
Browse files Browse the repository at this point in the history
…emes
  • Loading branch information
neretin-trike authored and Yakutoc committed Dec 13, 2023
1 parent d5cd408 commit 381cda2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions website/plasma-theme-builder/src/utils/generate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import {
ROBO_COMMENT,
generateThemes,
getThemeTokenDataGroups,
getThemesWithRestoredColors,
generateTokenSet,
getThemesTokensFallback,
} from '@salutejs/plasma-tokens-utils';
Expand Down Expand Up @@ -45,7 +46,7 @@ const getSortedExports = (exports: string) => {
};

export const getThemesTokenSet = (content: string) => {
const themesTokenDataGroups = getThemeTokenDataGroups(JSON.parse(content));
const themesTokenDataGroups = getThemesWithRestoredColors(getThemeTokenDataGroups(JSON.parse(content)));
return getThemesTokensFallback(themesTokenDataGroups);
};

Expand All @@ -57,7 +58,7 @@ export const getThemes = async (
) => {
const pathToIndex = getFilesPath().themesIndex;
const tokensThemeIndex = await getFilesSource(undefined, owner, repo, pathToIndex, defaultBranch);
const themes = generateThemes(tokensSet, undefined, true);
const themes = generateThemes(tokensSet, undefined, true, true);

const [darkTokens, lightTokens, newExports] = themes.map((item) => prettify(item.content));

Expand Down

0 comments on commit 381cda2

Please sign in to comment.