Skip to content

Commit

Permalink
rename all 'translations-ts-generator.config' files to 'generate-tran…
Browse files Browse the repository at this point in the history
…slations-ts-barrels.config'
  • Loading branch information
Platonn committed Dec 20, 2024
1 parent f3b1a21 commit cbce210
Show file tree
Hide file tree
Showing 42 changed files with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions scripts/i18n/generate-translations-ts-barrels.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,19 +52,17 @@ function getLicenseHeader(): string {
function getPrefix(translationDir: string): string | undefined {
const configPath = path.join(
translationDir,
'translations-ts-generator.config'
'generate-translations-ts-barrels.config'
);
if (fs.existsSync(configPath)) {
const content = fs.readFileSync(configPath, 'utf-8');
const match = content.match(/PUBLIC_API_PREFIX=(.+)/);
return match ? match[1].trim() : undefined;
} else {
// SPIKE TODO REMOVE
throw new Error(
`No translations-ts-generator.config file found in ${translationDir}`
`No generate-translations-ts-barrels.config file found in ${translationDir}`
);
}
return undefined;
}

function kebabToCamelCase(str: string): string {
Expand Down

0 comments on commit cbce210

Please sign in to comment.