-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathbuild.js
More file actions
43 lines (40 loc) · 1.54 KB
/
build.js
File metadata and controls
43 lines (40 loc) · 1.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import { build } from 'esbuild';
import info from './package.json' with { type: 'json' };
const userscriptHeader = `// ==UserScript==
// @name Advanced Flagging
// @namespace https://github.com/SOBotics
// @version ${info.version}
// @author Robert Rudman
// @contributor double-beep
// @match *://*.stackexchange.com/*
// @match *://*.stackoverflow.com/*
// @match *://*.superuser.com/*
// @match *://*.serverfault.com/*
// @match *://*.askubuntu.com/*
// @match *://*.stackapps.com/*
// @match *://*.mathoverflow.net/*
// @exclude *://chat.stackexchange.com/*
// @exclude *://chat.meta.stackexchange.com/*
// @exclude *://chat.stackoverflow.com/*
// @exclude *://area51.stackexchange.com/*
// @exclude *://data.stackexchange.com/*
// @exclude *://stackoverflow.com/c/*
// @exclude *://winterbash*.stackexchange.com/*
// @exclude *://api.stackexchange.com/*
// @grant GM_xmlhttpRequest
// @grant GM_getValue
// @grant GM_setValue
// @grant GM_deleteValue
// @grant GM_addStyle
// @downloadURL https://github.com/SOBotics/AdvancedFlagging/raw/master/dist/AdvancedFlagging.user.js
// @updateURL https://github.com/SOBotics/AdvancedFlagging/raw/master/dist/AdvancedFlagging.user.js
// ==/UserScript==
/* globals StackExchange, Stacks, $ */\n`;
await build({
entryPoints: [ 'src/AdvancedFlagging.ts' ],
bundle: true,
banner: {
js: userscriptHeader
},
outfile: 'dist/AdvancedFlagging.user.js',
});