Sharkey/packages/frontend/.storybook/preload-locale.ts

9 lines
248 B
TypeScript

import { writeFile } from 'node:fs/promises';
import * as locales from '../../../locales/index.js';
await writeFile(
new URL('locale.ts', import.meta.url),
`export default ${JSON.stringify(locales['ja-JP'], undefined, 2)} as const;`,
'utf8',
)