Skip to content

Commit

Permalink
[i18n] mkdir for tmp file
Browse files Browse the repository at this point in the history
  • Loading branch information
userXinos committed Jan 14, 2024
1 parent 97e307a commit b61bda8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions i18n/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ async function handler(locale) {
async function generateUsedKeys() {
const path = join(CONFIG.savePath, `tmp.json`);
const data = await parser(`/loc_strings/loc_strings_en.csv`);

if (!existsSync(dirname(path))) {
mkdirSync(dirname(path));
}
await writeFile(path, JSON.stringify(data)); // vue-i18n-extract требует это виде файла

return usedLocKeys(path);
Expand Down

0 comments on commit b61bda8

Please sign in to comment.