Refactor/Chore: prepare build infra for further optimization

This commit is contained in:
SukkaW
2023-09-14 20:45:01 +08:00
parent 78afa595a9
commit 0a4c99ab0e
21 changed files with 282 additions and 201 deletions

View File

@@ -23,7 +23,7 @@ const domainKeywordsSet = new Set();
/** @type {Set<string>} Dedupe domains included by DOMAIN-SUFFIX */
const domainSuffixSet = new Set();
runner(__filename, async () => {
const buildRejectDomainSet = async () => {
/** @type Set<string> */
const domainSets = new Set();
@@ -228,4 +228,10 @@ runner(__filename, async () => {
// Copy reject_sukka.conf for backward compatibility
fse.copy(pathResolve(__dirname, '../Source/domainset/reject_sukka.conf'), pathResolve(__dirname, '../List/domainset/reject_sukka.conf'))
]);
});
};
module.exports.buildRejectDomainSet = buildRejectDomainSet;
if (require.main === module) {
runner(__filename, buildRejectDomainSet);
}