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

View File

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

View File

@ -13,7 +13,7 @@ export type BuildContextLike = {
assert<BuildContext extends BuildContextLike ? true : false>();
export function generateSrcMainResourcesForThemeVariant(params: {
export function generateResourcesForThemeVariant(params: {
resourcesDirPath: string;
themeName: 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 * as child_process from "child_process";
import * as fs from "fs";
@ -82,7 +82,7 @@ export async function command(params: { cliCommandOptions: CliCommandOptions })
const resourcesDirPath = pathJoin(buildContext.keycloakifyBuildDirPath, "resources");
await generateSrcMainResources({
await generateResources({
resourcesDirPath,
buildContext
});