Refactor: some changes

This commit is contained in:
SukkaW
2024-11-09 03:18:49 +08:00
parent 4217149bbf
commit 85e42772ce
2 changed files with 18 additions and 13 deletions

View File

@@ -28,9 +28,6 @@ export const buildDeprecateFiles = task(require.main === module, __filename)((sp
));
for (const [filePath, description] of DEPRECATED_FILES) {
const surgeFile = path.resolve(OUTPUT_SURGE_DIR, `${filePath}.conf`);
const clashFile = path.resolve(OUTPUT_CLASH_DIR, `${filePath}.txt`);
const content = [
'#########################################',
'# Sukka\'s Ruleset - Deprecated',
@@ -39,8 +36,8 @@ export const buildDeprecateFiles = task(require.main === module, __filename)((sp
];
promises.push(
compareAndWriteFile(childSpan, content, surgeFile),
compareAndWriteFile(childSpan, content, clashFile)
compareAndWriteFile(childSpan, content, path.resolve(OUTPUT_SURGE_DIR, `${filePath}.conf`)),
compareAndWriteFile(childSpan, content, path.resolve(OUTPUT_CLASH_DIR, `${filePath}.txt`))
);
}