Improve intentionality
This commit is contained in:
parent
c07af8491c
commit
26b8dd9cda
@ -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
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user