Skip to content

Commit

Permalink
generate i18n.d.ts that prettier likes
Browse files Browse the repository at this point in the history
  • Loading branch information
schlawg committed Oct 15, 2024
1 parent 1d684b6 commit 1bf6386
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ui/.build/src/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ export async function build(pkgs: string[]): Promise<void> {
fs.promises.mkdir(env.buildTempDir),
]);

monitor(pkgs);
await Promise.all([sass(), copies(), i18n()]);
await esbuild(tsc());
monitor(pkgs);
}

export async function stop(): Promise<void> {
Expand Down
2 changes: 1 addition & 1 deletion ui/.build/src/i18n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ async function compileTypings(): Promise<void> {
.map(([k, v]) => {
const tpe = typeof v !== 'string' ? 'I18nPlural' : isFormat.test(v) ? 'I18nFormat' : 'string';
const comment = typeof v === 'string' ? v.split('\n')[0] : v['other']?.split('\n')[0];
return ` /** ${comment} */\n '${k}': ${tpe};`;
return ` /** ${comment} */\n ${k}: ${tpe};`;
})
.join('\n') +
'\n };\n',
Expand Down

0 comments on commit 1bf6386

Please sign in to comment.