-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.js
35 lines (34 loc) · 979 Bytes
/
build.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
const babel = require('rollup-plugin-babel')
const { version } = require('./package.json')
const json = require('rollup-plugin-json')
const banner = `// ==UserScript==
// @name 碧蓝幻想书签
// @namespace https://github.com/biuuu/gbf-bookmark
// @version ${version}
// @description none
// @author biuuu
// @match *://game.granbluefantasy.jp/*
// @match *://gbf.game.mbga.jp/*
// @run-at document-start
// @updateURL https://biuuu.github.io/gbf-bookmark/gbf-bookmark.user.js
// @supportURL https://github.com/biuuu/gbf-bookmark/issues
// ==/UserScript==`
module.exports = {
input: 'src/main.js',
plugins: [
json(),
babel({
exclude: 'node_modules/**',
presets: [['@babel/preset-env', {
modules: false,
targets: 'last 2 iOS versions'
}]]
})
],
output: {
file: './dist/gbf-bookmark.user.js',
format: 'iife',
name: 'gbf_bookmark_biuuu',
banner: banner
}
};