Fix replacing of xKeycloakify.themeName in theme variant

This commit is contained in:
Joseph Garrone 2025-01-05 21:09:06 +01:00
parent d01b4b71c9
commit 12690b892b

View File

@ -57,6 +57,8 @@ export async function generateResources(params: {
buildContext: BuildContextLike; buildContext: BuildContextLike;
resourcesDirPath: string; resourcesDirPath: string;
}): Promise<void> { }): Promise<void> {
const start = Date.now();
const { resourcesDirPath, buildContext } = params; const { resourcesDirPath, buildContext } = params;
const [themeName] = buildContext.themeNames; const [themeName] = buildContext.themeNames;
@ -742,7 +744,7 @@ export async function generateResources(params: {
} }
const emailThemeDirPath = getThemeTypeDirPath({ const emailThemeDirPath = getThemeTypeDirPath({
themeName, themeName: themeVariantName,
themeType themeType
}); });
@ -760,7 +762,7 @@ export async function generateResources(params: {
.toString("utf8") .toString("utf8")
.replace( .replace(
/xKeycloakify\.themeName/g, /xKeycloakify\.themeName/g,
`"${themeName}"` `"${themeVariantName}"`
), ),
"utf8" "utf8"
) )
@ -770,4 +772,6 @@ export async function generateResources(params: {
} }
} }
} }
console.log(`Generated resources in ${Date.now() - start}ms`);
} }