(variable: string, locales: string[])
| 60 | } |
| 61 | |
| 62 | function formatLocales(variable: string, locales: string[]): string { |
| 63 | const lines = [ |
| 64 | '# Generated by //tools:generate-cldr-locales. Do not edit manually.', |
| 65 | `${variable} = [`, |
| 66 | ...locales.map(locale => ` "${locale}",`), |
| 67 | ']', |
| 68 | '', |
| 69 | ] |
| 70 | return lines.join('\n') |
| 71 | } |
| 72 | |
| 73 | function main(args: Args) { |
| 74 | const {cldrPackage, jsonPath, out, variable = 'ALL_LOCALES'} = args |