-
Notifications
You must be signed in to change notification settings - Fork 0
/
rollup.conf.js
41 lines (38 loc) · 1.03 KB
/
rollup.conf.js
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
import virtual from '@rollup/plugin-virtual';
import { readFileSync } from 'fs';
const pkg = JSON.parse(readFileSync(new URL('./package.json', import.meta.url)));
let bannerText = `
// ==UserScript==
// @name DTF: Expand feed items
// @version ${pkg.version}
// @description Expand feed items!
// @license MIT
// @author murphyne
// @namespace https://github.com/murphyne
// @match *://dtf.ru/*
// @updateUrl https://github.com/murphyne/dtf-expand/releases/latest/download/dtf-expand.meta.js
// @downloadUrl https://github.com/murphyne/dtf-expand/releases/latest/download/dtf-expand.user.js
// @grant GM_addStyle
// ==/UserScript==
`;
export default [
{
input: 'src/main.js',
output: {
file: 'dist/dtf-expand.user.js',
format: 'esm',
banner: bannerText.trimStart(),
},
},
{
input: 'entry',
plugins: [
virtual({ entry: '' }),
],
output: {
file: 'dist/dtf-expand.meta.js',
format: 'esm',
banner: bannerText.trim(),
},
},
];