mirror of
https://github.com/SukkaW/Surge.git
synced 2026-01-29 01:51:52 +08:00
Refactor/Chore: prepare build infra for further optimization
This commit is contained in:
@@ -58,7 +58,7 @@ const _validateRuleset = async (filePath) => {
|
||||
}
|
||||
};
|
||||
|
||||
runner(__filename, async () => {
|
||||
const validate = async () => {
|
||||
const [domainsetFiles, _rulesetFiles] = await Promise.all([
|
||||
listDir(path.resolve(__dirname, '../List/domainset')),
|
||||
listDir(path.resolve(__dirname, '../List/non_ip'))
|
||||
@@ -67,4 +67,9 @@ runner(__filename, async () => {
|
||||
domainsetFiles.map(file => validateDomainSet(file))
|
||||
// rulesetFiles.map(file => validateRuleset(file))
|
||||
);
|
||||
});
|
||||
};
|
||||
module.exports.validate = validate;
|
||||
|
||||
if (require.main === module) {
|
||||
runner(__filename, validate);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user