Added Bengali and Thai languages.
This commit is contained in:
@@ -2,17 +2,12 @@ const fs = require('fs-extra');
|
||||
const path = require('path');
|
||||
const del = require('del');
|
||||
const prettier = require('prettier');
|
||||
const chalk = require('chalk');
|
||||
|
||||
const src = path.resolve(__dirname, '../lang');
|
||||
const dest = path.resolve(__dirname, '../build');
|
||||
const files = fs.readdirSync(src);
|
||||
|
||||
const removed = del.sync([path.join(dest, '*.json')]);
|
||||
|
||||
if (removed.length) {
|
||||
console.log(removed.map(n => `${n} ${chalk.redBright('✗')}`).join('\n'));
|
||||
}
|
||||
del.sync([path.join(dest, '*.json')]);
|
||||
|
||||
async function run() {
|
||||
await fs.ensureDir(dest);
|
||||
@@ -29,8 +24,6 @@ async function run() {
|
||||
const json = prettier.format(JSON.stringify(formatted), { parser: 'json' });
|
||||
|
||||
fs.writeFileSync(path.resolve(dest, file), json);
|
||||
|
||||
console.log(path.resolve(src, file), chalk.greenBright('->'), path.resolve(dest, file));
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user