Rename generateSrcMainResources -> generateResources

This commit is contained in:
Joseph Garrone 2024-06-12 14:48:08 +02:00
parent a78af5080a
commit 0bc3f08cc1
10 changed files with 13 additions and 13 deletions

View File

@ -1,20 +1,20 @@
import type { BuildContext } from "../../shared/buildContext"; import type { BuildContext } from "../../shared/buildContext";
import { assert } from "tsafe/assert"; import { assert } from "tsafe/assert";
import { import {
generateSrcMainResourcesForMainTheme, generateResourcesForMainTheme,
type BuildContextLike as BuildContextLike_generateSrcMainResourcesForMainTheme type BuildContextLike as BuildContextLike_generateResourcesForMainTheme
} from "./generateSrcMainResourcesForMainTheme"; } from "./generateResourcesForMainTheme";
import { generateSrcMainResourcesForThemeVariant } from "./generateSrcMainResourcesForThemeVariant"; import { generateResourcesForThemeVariant } from "./generateResourcesForThemeVariant";
import fs from "fs"; import fs from "fs";
import { rmSync } from "../../tools/fs.rmSync"; import { rmSync } from "../../tools/fs.rmSync";
export type BuildContextLike = BuildContextLike_generateSrcMainResourcesForMainTheme & { export type BuildContextLike = BuildContextLike_generateResourcesForMainTheme & {
themeNames: string[]; themeNames: string[];
}; };
assert<BuildContext extends BuildContextLike ? true : false>(); assert<BuildContext extends BuildContextLike ? true : false>();
export async function generateSrcMainResources(params: { export async function generateResources(params: {
buildContext: BuildContextLike; buildContext: BuildContextLike;
resourcesDirPath: string; resourcesDirPath: string;
}): Promise<void> { }): Promise<void> {
@ -26,14 +26,14 @@ export async function generateSrcMainResources(params: {
rmSync(resourcesDirPath, { recursive: true }); rmSync(resourcesDirPath, { recursive: true });
} }
await generateSrcMainResourcesForMainTheme({ await generateResourcesForMainTheme({
resourcesDirPath, resourcesDirPath,
themeName, themeName,
buildContext buildContext
}); });
for (const themeVariantName of themeVariantNames) { for (const themeVariantName of themeVariantNames) {
generateSrcMainResourcesForThemeVariant({ generateResourcesForThemeVariant({
resourcesDirPath, resourcesDirPath,
themeName, themeName,
themeVariantName themeVariantName

View File

@ -52,7 +52,7 @@ export type BuildContextLike = BuildContextLike_kcContextExclusionsFtlCode &
assert<BuildContext extends BuildContextLike ? true : false>(); assert<BuildContext extends BuildContextLike ? true : false>();
export async function generateSrcMainResourcesForMainTheme(params: { export async function generateResourcesForMainTheme(params: {
themeName: string; themeName: string;
resourcesDirPath: string; resourcesDirPath: string;
buildContext: BuildContextLike; buildContext: BuildContextLike;

View File

@ -13,7 +13,7 @@ export type BuildContextLike = {
assert<BuildContext extends BuildContextLike ? true : false>(); assert<BuildContext extends BuildContextLike ? true : false>();
export function generateSrcMainResourcesForThemeVariant(params: { export function generateResourcesForThemeVariant(params: {
resourcesDirPath: string; resourcesDirPath: string;
themeName: string; themeName: string;
themeVariantName: string; themeVariantName: string;

View File

@ -0,0 +1 @@
export * from "./generateResources";

View File

@ -1 +0,0 @@
export * from "./generateSrcMainResources";

View File

@ -1,4 +1,4 @@
import { generateSrcMainResources } from "./generateSrcMainResources"; import { generateResources } from "./generateResources";
import { join as pathJoin, relative as pathRelative, sep as pathSep } from "path"; import { join as pathJoin, relative as pathRelative, sep as pathSep } from "path";
import * as child_process from "child_process"; import * as child_process from "child_process";
import * as fs from "fs"; import * as fs from "fs";
@ -82,7 +82,7 @@ export async function command(params: { cliCommandOptions: CliCommandOptions })
const resourcesDirPath = pathJoin(buildContext.keycloakifyBuildDirPath, "resources"); const resourcesDirPath = pathJoin(buildContext.keycloakifyBuildDirPath, "resources");
await generateSrcMainResources({ await generateResources({
resourcesDirPath, resourcesDirPath,
buildContext buildContext
}); });