Remove dead code

This commit is contained in:
Joseph Garrone
2024-01-31 21:56:46 +01:00
parent fde34be270
commit bd25621b2c

View File

@ -51,8 +51,6 @@ export async function generateTheme(params: {
let allCssGlobalsToDefine: Record<string, string> = {}; let allCssGlobalsToDefine: Record<string, string> = {};
let generateFtlFilesCode_glob: ReturnType<typeof generateFtlFilesCodeFactory>["generateFtlFilesCode"] | undefined = undefined;
for (const themeType of themeTypes) { for (const themeType of themeTypes) {
if (!fs.existsSync(pathJoin(themeSrcDirPath, themeType))) { if (!fs.existsSync(pathJoin(themeSrcDirPath, themeType))) {
continue; continue;
@ -114,22 +112,19 @@ export async function generateTheme(params: {
}); });
} }
const generateFtlFilesCode = const { generateFtlFilesCode } = generateFtlFilesCodeFactory({
generateFtlFilesCode_glob !== undefined themeName,
? generateFtlFilesCode_glob "indexHtmlCode": fs.readFileSync(pathJoin(buildOptions.reactAppBuildDirPath, "index.html")).toString("utf8"),
: generateFtlFilesCodeFactory({ "cssGlobalsToDefine": allCssGlobalsToDefine,
themeName, buildOptions,
"indexHtmlCode": fs.readFileSync(pathJoin(buildOptions.reactAppBuildDirPath, "index.html")).toString("utf8"), keycloakifyVersion,
"cssGlobalsToDefine": allCssGlobalsToDefine, themeType,
buildOptions, "fieldNames": readFieldNameUsage({
keycloakifyVersion, keycloakifySrcDirPath,
themeType, themeSrcDirPath,
"fieldNames": readFieldNameUsage({ themeType
keycloakifySrcDirPath, })
themeSrcDirPath, });
themeType
})
}).generateFtlFilesCode;
[ [
...(() => { ...(() => {