rename themeName --> variantName

This commit is contained in:
RMidhunSuresh 2022-05-30 11:48:02 +05:30
parent e8e4c33bae
commit 8ad0b8a726
2 changed files with 4 additions and 4 deletions

View File

@ -272,7 +272,7 @@ module.exports = function buildThemes(options) {
* "light" options.
*/
const defaultVariant = dark ? defaultDarkVariant : defaultLightVariant;
defaultVariant.themeDisplayName = variantName;
defaultVariant.variantName = variantName;
defaultVariant.id = themeId
defaultVariant.cssLocation = assetMap.get(chunk.fileName).fileName;
continue;
@ -297,7 +297,7 @@ module.exports = function buildThemes(options) {
* treat it like any other variant.
*/
const variant = defaultDarkVariant.id ? defaultDarkVariant : defaultLightVariant;
builtAssets[`${themeName} ${variant.themeDisplayName}`] = { id: variant.id, cssLocation: variant.cssLocation };
builtAssets[`${themeName} ${variant.variantName}`] = { id: variant.id, cssLocation: variant.cssLocation };
}
manifest.source = {
"built-assets": builtAssets,

View File

@ -26,12 +26,12 @@ type DefaultVariant = {
dark: {
id: string;
cssLocation: string;
themeDisplayName: string;
variantName: string;
};
light: {
id: string;
cssLocation: string;
themeDisplayName: string;
variantName: string;
};
}
type ThemeInformation = NormalVariant | DefaultVariant;