Improve intentionality

This commit is contained in:
Joseph Garrone 2024-09-22 22:48:31 +02:00
parent c07af8491c
commit 26b8dd9cda
2 changed files with 12 additions and 8 deletions

View File

@ -26,7 +26,8 @@ export async function generateResources(params: {
rmSync(resourcesDirPath, { recursive: true });
}
const { writeMessagePropertiesFiles } = await generateResourcesForMainTheme({
const { writeMessagePropertiesFilesForThemeVariant } =
await generateResourcesForMainTheme({
resourcesDirPath,
themeName,
buildContext
@ -37,7 +38,7 @@ export async function generateResources(params: {
resourcesDirPath,
themeName,
themeVariantName,
writeMessagePropertiesFiles
writeMessagePropertiesFiles: writeMessagePropertiesFilesForThemeVariant
});
}
}

View File

@ -51,7 +51,7 @@ export async function generateResourcesForMainTheme(params: {
themeName: string;
resourcesDirPath: string;
}): Promise<{
writeMessagePropertiesFiles: (params: {
writeMessagePropertiesFilesForThemeVariant: (params: {
getMessageDirPath: (params: { themeType: ThemeType }) => string;
themeName: string;
}) => void;
@ -353,7 +353,10 @@ export async function generateResourcesForMainTheme(params: {
}
return {
writeMessagePropertiesFiles: ({ getMessageDirPath, themeName }) => {
writeMessagePropertiesFilesForThemeVariant: ({
getMessageDirPath,
themeName
}) => {
objectEntries(writeMessagePropertiesFilesByThemeType).forEach(
([themeType, writeMessagePropertiesFiles]) => {
if (writeMessagePropertiesFiles === undefined) {