-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathmeta.js
More file actions
46 lines (40 loc) · 1.16 KB
/
meta.js
File metadata and controls
46 lines (40 loc) · 1.16 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
44
45
46
const path = require('path');
const { pathToFileURL } = require('url');
const pkg = require('./package.json');
const distURLBase = "https://raw.githubusercontent.com/mattmarkwick/fooocus-gallery/main/dist/";
const packageName = pkg.name;
const production = !process.env.ROLLUP_WATCH;
const baseUrl = !production ? path.join(__dirname, 'dist') : distURLBase;
let meta = {
"name": production ? packageName : packageName + ' -> dev',
"version": pkg.version,
"description": pkg.description,
"homepage": pkg.homepage,
"author": pkg.author,
"namespace": "https://github.com/mattmarkwick/fooocus-gallery/",
"resource": {
css: baseUrl + 'bundle.css',
},
"match": [
"file:///*/Fooocus/outputs/*/log.html",
"http://*/file=*/Fooocus/outputs/*/log.html"
],
"grant": [
"GM_addStyle",
"GM_getResourceText",
"GM_xmlhttpRequest"
],
"connect": [
],
"run-at": "document-idle"
}
if(!production){
meta.require= [
pathToFileURL(path.join(baseUrl, 'bundle.js'))
];
}
if(production) {
meta.downloadURL = baseUrl + 'bundle.js';
meta.updateURL = baseUrl + 'bundle.js';
}
module.exports = meta;