mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-02 18:20:39 +08:00
33 lines
547 B
TypeScript
33 lines
547 B
TypeScript
import { resolve } from 'node:path';
|
|
|
|
import { runCli } from '@magic-works/i18n-codegen';
|
|
|
|
import { projectRoot } from '../config/index.js';
|
|
|
|
const configPath = resolve(projectRoot, '.i18n-codegen.json');
|
|
|
|
export const watchI18N = () => {
|
|
runCli(
|
|
{
|
|
config: configPath,
|
|
watch: true,
|
|
},
|
|
error => {
|
|
console.error(error);
|
|
}
|
|
);
|
|
};
|
|
|
|
export const buildI18N = () => {
|
|
runCli(
|
|
{
|
|
config: configPath,
|
|
watch: false,
|
|
},
|
|
error => {
|
|
console.error(error);
|
|
process.exit(1);
|
|
}
|
|
);
|
|
};
|