(changedFiles, _, platforms)
| 100 | export function createBundleLocalesTask(srcLocalesDir) { |
| 101 | /** @type {(changedFiles: string[], watcher: any, platforms: any) => Promise<void>} */ |
| 102 | const onChange = async (changedFiles, _, platforms) => { |
| 103 | const localesSrcDir = absolutePath(srcLocalesDir); |
| 104 | for (const file of changedFiles) { |
| 105 | const fileName = file.substring(file.lastIndexOf(path.sep) + 1); |
| 106 | const code = /** @type {string} */(fileName.split('.').at(-2)); |
| 107 | const locale = await mergeLocale(localesSrcDir, code); |
| 108 | await writeFiles(locale, fileName, {platforms, debug: true}); |
| 109 | } |
| 110 | reload.reload({type: reload.FULL}); |
| 111 | }; |
| 112 | |
| 113 | return createTask( |
| 114 | 'bundle-locales', |
nothing calls this directly
no test coverage detected
searching dependent graphs…