Replaced __dirname usage.

This commit is contained in:
Mike Cao 2025-04-29 09:53:11 -07:00
parent b5efbbbb2e
commit 73b45a9f5e
11 changed files with 25 additions and 28 deletions

View file

@ -5,10 +5,8 @@ import https from 'https';
import chalk from 'chalk';
import url from "node:url";
const __dirname = path.dirname(url.fileURLToPath(import.meta.url));
const src = path.resolve(__dirname, '../src/lang');
const dest = path.resolve(__dirname, '../public/intl/country');
const src = path.resolve(process.cwd(), 'src/lang');
const dest = path.resolve(process.cwd(), 'public/intl/country');
const files = fs.readdirSync(src);
const getUrl = locale =>