mirror of
https://github.com/SukkaW/Surge.git
synced 2026-01-29 01:51:52 +08:00
Chore: refactor output dir
This commit is contained in:
@@ -25,6 +25,11 @@ export const treeDir = async (rootPath: string): Promise<TreeTypeArray> => {
|
||||
const walk = async (dir: string, node: TreeTypeArray, dirRelativeToRoot = ''): Promise<VoidOrVoidArray> => {
|
||||
const promises: Array<Promise<VoidOrVoidArray>> = [];
|
||||
for await (const child of await fsp.opendir(dir)) {
|
||||
// Ignore hidden files
|
||||
if (child.name[0] === '.' || child.name === 'CNAME') {
|
||||
continue;
|
||||
}
|
||||
|
||||
const childFullPath = child.parentPath + sep + child.name;
|
||||
const childRelativeToRoot = dirRelativeToRoot + sep + child.name;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user