Skip to content

Commit 67d0f5b

Browse files
committed
refactor: streamline Worker function structure for improved readability
1 parent b7e2558 commit 67d0f5b

1 file changed

Lines changed: 27 additions & 27 deletions

File tree

builder/source/build-grouped-worker.ts

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -15,32 +15,32 @@ export default async function Worker({ FileName, Domains }: { FileName: Set<stri
1515
let DownloadURL = new URL(WorkerData.Config.SubscriptionUrl.replaceAll('/tinyShield.user.js', `/grouped/${[...FileName][0][0]}/tinyShield-${[...FileName][0]}.user.js`))
1616

1717
const Banner = CreateBanner({
18-
Version: WorkerData.Config.Version!,
19-
BuildType: WorkerData.Config.BuildType ?? 'production',
20-
Domains: Domains,
21-
Name: `tinyShield for Safari and ${[...FileName][0]}`,
22-
Namespace: 'https://github.com/FilteringDev/tinyShield',
23-
DownloadURL: DownloadURL,
24-
UpdateURL: DownloadURL,
25-
HomepageURL: new URL('https://github.com/FilteringDev/tinyShield'),
26-
SupportURL: new URL('https://github.com/FilteringDev/tinyShield/issues'),
27-
License: 'MPL-2.0',
28-
Author: 'PiQuark6046 and contributors',
29-
Description: {
30-
en: 'tinyShield allows AdGuard, uBlock Origin, Brave and ABP to resist against Ad-Shield quickly.',
31-
ko: 'tinyShield는 AdGuard, uBlock Origin, Brave 와 ABP가 애드쉴드에 빠르게 저항할 수 있도록 합니다.',
32-
ja: 'tinyShieldを使うと、AdGuard, uBlock Origin, Brave, およびABPがAd-Shieldに素早く対抗できます。'
33-
}
34-
})
18+
Version: WorkerData.Config.Version!,
19+
BuildType: WorkerData.Config.BuildType ?? 'production',
20+
Domains: Domains,
21+
Name: `tinyShield for Safari and ${[...FileName][0]}`,
22+
Namespace: 'https://github.com/FilteringDev/tinyShield',
23+
DownloadURL: DownloadURL,
24+
UpdateURL: DownloadURL,
25+
HomepageURL: new URL('https://github.com/FilteringDev/tinyShield'),
26+
SupportURL: new URL('https://github.com/FilteringDev/tinyShield/issues'),
27+
License: 'MPL-2.0',
28+
Author: 'PiQuark6046 and contributors',
29+
Description: {
30+
en: 'tinyShield allows AdGuard, uBlock Origin, Brave and ABP to resist against Ad-Shield quickly.',
31+
ko: 'tinyShield는 AdGuard, uBlock Origin, Brave 와 ABP가 애드쉴드에 빠르게 저항할 수 있도록 합니다.',
32+
ja: 'tinyShieldを使うと、AdGuard, uBlock Origin, Brave, およびABPがAd-Shieldに素早く対抗できます。'
33+
}
34+
})
3535

36-
await ESBuild.build({
37-
entryPoints: [WorkerData.ProjectRoot + '/userscript/source/index.ts'],
38-
bundle: true,
39-
minify: WorkerData.Config.Minify,
40-
outfile: `${WorkerData.ProjectRoot}/dist/grouped/${[...FileName][0][0]}/tinyShield-${[...FileName][0]}.user.js`,
41-
banner: {
42-
js: Banner
43-
},
44-
target: ['es2024', 'chrome119', 'firefox142', 'safari26']
45-
})
36+
await ESBuild.build({
37+
entryPoints: [WorkerData.ProjectRoot + '/userscript/source/index.ts'],
38+
bundle: true,
39+
minify: WorkerData.Config.Minify,
40+
outfile: `${WorkerData.ProjectRoot}/dist/grouped/${[...FileName][0][0]}/tinyShield-${[...FileName][0]}.user.js`,
41+
banner: {
42+
js: Banner
43+
},
44+
target: ['es2024', 'chrome119', 'firefox142', 'safari26']
45+
})
4646
}

0 commit comments

Comments
 (0)