Improve intentionality
This commit is contained in:
parent
c07af8491c
commit
26b8dd9cda
@ -26,7 +26,8 @@ export async function generateResources(params: {
|
|||||||
rmSync(resourcesDirPath, { recursive: true });
|
rmSync(resourcesDirPath, { recursive: true });
|
||||||
}
|
}
|
||||||
|
|
||||||
const { writeMessagePropertiesFiles } = await generateResourcesForMainTheme({
|
const { writeMessagePropertiesFilesForThemeVariant } =
|
||||||
|
await generateResourcesForMainTheme({
|
||||||
resourcesDirPath,
|
resourcesDirPath,
|
||||||
themeName,
|
themeName,
|
||||||
buildContext
|
buildContext
|
||||||
@ -37,7 +38,7 @@ export async function generateResources(params: {
|
|||||||
resourcesDirPath,
|
resourcesDirPath,
|
||||||
themeName,
|
themeName,
|
||||||
themeVariantName,
|
themeVariantName,
|
||||||
writeMessagePropertiesFiles
|
writeMessagePropertiesFiles: writeMessagePropertiesFilesForThemeVariant
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -51,7 +51,7 @@ export async function generateResourcesForMainTheme(params: {
|
|||||||
themeName: string;
|
themeName: string;
|
||||||
resourcesDirPath: string;
|
resourcesDirPath: string;
|
||||||
}): Promise<{
|
}): Promise<{
|
||||||
writeMessagePropertiesFiles: (params: {
|
writeMessagePropertiesFilesForThemeVariant: (params: {
|
||||||
getMessageDirPath: (params: { themeType: ThemeType }) => string;
|
getMessageDirPath: (params: { themeType: ThemeType }) => string;
|
||||||
themeName: string;
|
themeName: string;
|
||||||
}) => void;
|
}) => void;
|
||||||
@ -353,7 +353,10 @@ export async function generateResourcesForMainTheme(params: {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
writeMessagePropertiesFiles: ({ getMessageDirPath, themeName }) => {
|
writeMessagePropertiesFilesForThemeVariant: ({
|
||||||
|
getMessageDirPath,
|
||||||
|
themeName
|
||||||
|
}) => {
|
||||||
objectEntries(writeMessagePropertiesFilesByThemeType).forEach(
|
objectEntries(writeMessagePropertiesFilesByThemeType).forEach(
|
||||||
([themeType, writeMessagePropertiesFiles]) => {
|
([themeType, writeMessagePropertiesFiles]) => {
|
||||||
if (writeMessagePropertiesFiles === undefined) {
|
if (writeMessagePropertiesFiles === undefined) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user