mirror of
https://iceshrimp.dev/Crimekillz/jointrashposs.git
synced 2024-11-22 00:43:50 +01:00
(dev) 翻訳のymlを変更したら自動的にJSONに変換するように
This commit is contained in:
parent
087a00a4b9
commit
8aae90fdbb
@ -1,7 +1,7 @@
|
||||
// https://nuxt.com/docs/api/configuration/nuxt-config
|
||||
import yaml from '@rollup/plugin-yaml';
|
||||
import svgLoader from 'vite-svg-loader';
|
||||
import { readFileSync } from 'fs';
|
||||
import { readFileSync, watch as fsWatch } from 'fs';
|
||||
import { genApiTranslationFiles } from './scripts/gen-api-translations';
|
||||
import { getOldHubRedirects } from './scripts/get-old-hub-redirects';
|
||||
import { genLocalesJson } from './scripts/gen-locales';
|
||||
@ -175,6 +175,13 @@ export default defineNuxtConfig({
|
||||
'build:before': async (...args) => {
|
||||
genApiTranslationFiles(...args);
|
||||
genLocalesJson(...args);
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
fsWatch('./locales/', (ev, filename) => {
|
||||
if (filename && filename.endsWith('.yml')) {
|
||||
genLocalesJson(...args);
|
||||
}
|
||||
});
|
||||
}
|
||||
await fetchCrowdinMembers(...args);
|
||||
},
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user