Build account theme
This commit is contained in:
parent
cdd4460968
commit
17871daf0c
@ -13,8 +13,6 @@ import { getLogger } from "./tools/logger";
|
||||
const { isSilent } = getCliOptions(process.argv.slice(2));
|
||||
const logger = getLogger({ isSilent });
|
||||
|
||||
console.log({ keycloakThemeEmailDirPath });
|
||||
|
||||
if (fs.existsSync(keycloakThemeEmailDirPath)) {
|
||||
logger.warn(`There is already a ${pathRelative(process.cwd(), keycloakThemeEmailDirPath)} directory in your project. Aborting.`);
|
||||
|
||||
|
@ -3,7 +3,7 @@ import * as fs from "fs";
|
||||
import { join as pathJoin, basename as pathBasename } from "path";
|
||||
import { replaceImportsFromStaticInJsCode } from "./replacers/replaceImportsFromStaticInJsCode";
|
||||
import { replaceImportsInCssCode } from "./replacers/replaceImportsInCssCode";
|
||||
import { generateFtlFilesCodeFactory, loginThemePageIds, themeTypes, ThemeType } from "./generateFtl";
|
||||
import { generateFtlFilesCodeFactory, loginThemePageIds, accountThemePageIds, themeTypes, type ThemeType } from "./generateFtl";
|
||||
import { downloadBuiltinKeycloakTheme } from "../download-builtin-keycloak-theme";
|
||||
import { mockTestingResourcesCommonPath, mockTestingResourcesPath, mockTestingSubDirOfPublicDirBasename } from "../mockTestingResourcesPath";
|
||||
import { isInside } from "../tools/isInside";
|
||||
@ -151,7 +151,24 @@ export async function generateKeycloakThemeResources(params: {
|
||||
return generateFtlFilesCode;
|
||||
})();
|
||||
|
||||
[...loginThemePageIds, ...(buildOptions.extraLoginPages ?? [])].forEach(pageId => {
|
||||
[
|
||||
...(() => {
|
||||
switch (themeType) {
|
||||
case "login":
|
||||
return loginThemePageIds;
|
||||
case "account":
|
||||
return accountThemePageIds;
|
||||
}
|
||||
})(),
|
||||
...((() => {
|
||||
switch (themeType) {
|
||||
case "login":
|
||||
return buildOptions.extraLoginPages;
|
||||
case "account":
|
||||
return buildOptions.extraAccountPages;
|
||||
}
|
||||
})() ?? [])
|
||||
].forEach(pageId => {
|
||||
const { ftlCode } = generateFtlFilesCode({ pageId });
|
||||
|
||||
fs.mkdirSync(themeDirPath, { "recursive": true });
|
||||
|
@ -6,6 +6,8 @@ import { join as pathJoin } from "path";
|
||||
import { getProjectRoot } from "keycloakify/bin/tools/getProjectRoot.js";
|
||||
|
||||
(async () => {
|
||||
fs.rmSync(sampleReactProjectDirPath, { "recursive": true });
|
||||
|
||||
await setupSampleReactProject();
|
||||
|
||||
const binDirPath = pathJoin(getProjectRoot(), "dist_test", "src", "bin");
|
||||
|
Loading…
x
Reference in New Issue
Block a user