mirror of
https://github.com/SukkaW/Surge.git
synced 2026-01-29 01:51:52 +08:00
Perf: make build faster
This commit is contained in:
@@ -5,9 +5,11 @@ const fs = require('fs');
|
||||
const { parseFelixDnsmasq } = require('./lib/parse-dnsmasq');
|
||||
|
||||
(async () => {
|
||||
const result = await parseFelixDnsmasq('https://raw.githubusercontent.com/felixonmars/dnsmasq-china-list/master/accelerated-domains.china.conf');
|
||||
const [result] = await Promise.all([
|
||||
parseFelixDnsmasq('https://raw.githubusercontent.com/felixonmars/dnsmasq-china-list/master/accelerated-domains.china.conf'),
|
||||
fse.ensureDir(path.resolve(__dirname, '../List/internal'))
|
||||
]);
|
||||
|
||||
await fse.ensureDir(path.resolve(__dirname, '../List/internal'));
|
||||
await fs.promises.writeFile(
|
||||
path.resolve(__dirname, '../List/internal/accelerated-china-domains.txt'),
|
||||
`${result.map(line => `SUFFIX,${line}`).join('\n')}\n`
|
||||
|
||||
Reference in New Issue
Block a user