-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathuserscript.config.ts
35 lines (30 loc) · 985 Bytes
/
userscript.config.ts
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
import pkg from './package.json'
import type { WPUSOptions } from 'webpack-userscript'
interface IWebpackUserScript {
/* userscript version */
scriptVersion: string
/* homepage url (github pages) */
scriptHomePage: string
/* script file name, without file extension */
scriptFileName: string
/**
* userscript headers
* including script name, description, match url, grants and so on
* see https://www.tampermonkey.net/documentation.php for details
**/
scriptHeaders: WPUSOptions['headers']
}
export const UserScriptConfig: IWebpackUserScript = {
scriptVersion: pkg.version,
scriptHomePage: pkg.homepage,
scriptFileName: pkg.name,
scriptHeaders: {
name: pkg.name,
description: pkg.description,
version: pkg.version,
author: pkg.author.name,
updateURL: `${pkg.homepage}${pkg.name}.meta.js`,
downloadURL: `${pkg.homepage}${pkg.name}.user.js`,
include: '/^(http|https)://(example.com|example.org|example.edu).*$/'
}
}