Chore: refactor output dir

This commit is contained in:
SukkaW
2024-09-06 19:49:17 +08:00
parent 5bc2e017df
commit 315b38b999
19 changed files with 117 additions and 172 deletions

View File

@@ -2,8 +2,7 @@ import path from 'node:path';
import fsp from 'node:fs/promises';
import { fdir as Fdir } from 'fdir';
import { readFileByLine } from './lib/fetch-text-by-line';
const sourceDir = path.resolve(__dirname, '../Source');
import { SOURCE_DIR } from './constants/dir';
(async () => {
const promises: Array<Promise<unknown>> = [];
@@ -27,7 +26,7 @@ const sourceDir = path.resolve(__dirname, '../Source');
return true;
})
.crawl(sourceDir)
.crawl(SOURCE_DIR)
.withPromise();
for (let i = 0, len = paths.length; i < len; i++) {