Rename extraThemeNames to themeVariantNames
This commit is contained in:
parent
5af8d67b62
commit
37dbd49589
@ -166,7 +166,7 @@ There are very few breaking changes in this major version. [Check them out](http
|
|||||||
## 7.12
|
## 7.12
|
||||||
|
|
||||||
- You can now pack multiple themes variant in a single `.jar` bundle. In vanilla Keycloak themes you have the ability to extend a base theme.
|
- You can now pack multiple themes variant in a single `.jar` bundle. In vanilla Keycloak themes you have the ability to extend a base theme.
|
||||||
There is now an idiomatic way of achieving the same result. [Learn more](https://docs.keycloakify.dev/build-options#keycloakify.extrathemenames).
|
There is now an idiomatic way of achieving the same result. [Learn more](https://docs.keycloakify.dev/build-options#keycloakify.themeVariantNames).
|
||||||
|
|
||||||
## 7.9
|
## 7.9
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ export type BuildOptions = {
|
|||||||
isSilent: boolean;
|
isSilent: boolean;
|
||||||
themeVersion: string;
|
themeVersion: string;
|
||||||
themeName: string;
|
themeName: string;
|
||||||
extraThemeNames: string[];
|
themeVariantNames: string[];
|
||||||
extraThemeProperties: string[] | undefined;
|
extraThemeProperties: string[] | undefined;
|
||||||
groupId: string;
|
groupId: string;
|
||||||
artifactId: string;
|
artifactId: string;
|
||||||
@ -48,7 +48,7 @@ export function readBuildOptions(params: { reactAppRootDirPath: string; processA
|
|||||||
artifactId,
|
artifactId,
|
||||||
doCreateJar,
|
doCreateJar,
|
||||||
loginThemeResourcesFromKeycloakVersion,
|
loginThemeResourcesFromKeycloakVersion,
|
||||||
extraThemeNames = []
|
themeVariantNames = []
|
||||||
} = keycloakify ?? {};
|
} = keycloakify ?? {};
|
||||||
|
|
||||||
const themeName =
|
const themeName =
|
||||||
@ -61,7 +61,7 @@ export function readBuildOptions(params: { reactAppRootDirPath: string; processA
|
|||||||
return {
|
return {
|
||||||
reactAppRootDirPath,
|
reactAppRootDirPath,
|
||||||
themeName,
|
themeName,
|
||||||
extraThemeNames,
|
themeVariantNames,
|
||||||
"doCreateJar": doCreateJar ?? true,
|
"doCreateJar": doCreateJar ?? true,
|
||||||
"artifactId": process.env.KEYCLOAKIFY_ARTIFACT_ID ?? artifactId ?? `${themeName}-keycloak-theme`,
|
"artifactId": process.env.KEYCLOAKIFY_ARTIFACT_ID ?? artifactId ?? `${themeName}-keycloak-theme`,
|
||||||
"groupId": (() => {
|
"groupId": (() => {
|
||||||
|
@ -8,7 +8,7 @@ import { bringInAccountV1, accountV1 } from "./bringInAccountV1";
|
|||||||
|
|
||||||
export type BuildOptionsLike = {
|
export type BuildOptionsLike = {
|
||||||
themeName: string;
|
themeName: string;
|
||||||
extraThemeNames: string[];
|
themeVariantNames: string[];
|
||||||
groupId: string;
|
groupId: string;
|
||||||
artifactId: string;
|
artifactId: string;
|
||||||
themeVersion: string;
|
themeVersion: string;
|
||||||
@ -178,7 +178,7 @@ export async function generateJavaStackFiles(params: {
|
|||||||
"types": ["account"]
|
"types": ["account"]
|
||||||
}
|
}
|
||||||
]),
|
]),
|
||||||
...[buildOptions.themeName, ...buildOptions.extraThemeNames]
|
...[buildOptions.themeName, ...buildOptions.themeVariantNames]
|
||||||
.map(themeName => [
|
.map(themeName => [
|
||||||
{
|
{
|
||||||
"name": themeName,
|
"name": themeName,
|
||||||
@ -190,7 +190,7 @@ export async function generateJavaStackFiles(params: {
|
|||||||
? []
|
? []
|
||||||
: [
|
: [
|
||||||
{
|
{
|
||||||
"name": `${themeName}_retrocompatible`,
|
"name": `${themeName}_retrocompat`,
|
||||||
"types": ["account"]
|
"types": ["account"]
|
||||||
}
|
}
|
||||||
])
|
])
|
||||||
|
@ -26,7 +26,7 @@ export async function main() {
|
|||||||
|
|
||||||
const { themeSrcDirPath } = getThemeSrcDirPath({ reactAppRootDirPath });
|
const { themeSrcDirPath } = getThemeSrcDirPath({ reactAppRootDirPath });
|
||||||
|
|
||||||
for (const themeName of [buildOptions.themeName, ...buildOptions.extraThemeNames]) {
|
for (const themeName of [buildOptions.themeName, ...buildOptions.themeVariantNames]) {
|
||||||
await generateTheme({
|
await generateTheme({
|
||||||
themeSrcDirPath,
|
themeSrcDirPath,
|
||||||
"keycloakifySrcDirPath": pathJoin(keycloakifyDirPath, "src"),
|
"keycloakifySrcDirPath": pathJoin(keycloakifyDirPath, "src"),
|
||||||
|
@ -18,7 +18,7 @@ export type ParsedPackageJson = {
|
|||||||
reactAppBuildDirPath?: string;
|
reactAppBuildDirPath?: string;
|
||||||
keycloakifyBuildDirPath?: string;
|
keycloakifyBuildDirPath?: string;
|
||||||
themeName?: string;
|
themeName?: string;
|
||||||
extraThemeNames?: string[];
|
themeVariantNames?: string[];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -37,7 +37,7 @@ export const zParsedPackageJson = z.object({
|
|||||||
"reactAppBuildDirPath": z.string().optional(),
|
"reactAppBuildDirPath": z.string().optional(),
|
||||||
"keycloakifyBuildDirPath": z.string().optional(),
|
"keycloakifyBuildDirPath": z.string().optional(),
|
||||||
"themeName": z.string().optional(),
|
"themeName": z.string().optional(),
|
||||||
"extraThemeNames": z.array(z.string()).optional()
|
"themeVariantNames": z.array(z.string()).optional()
|
||||||
})
|
})
|
||||||
.optional()
|
.optional()
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user