-
Notifications
You must be signed in to change notification settings - Fork 2
/
rollup.config.js
55 lines (53 loc) · 969 Bytes
/
rollup.config.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
import pkg from './package.json'
import sourceMaps from 'rollup-plugin-sourcemaps'
import cleanup from 'rollup-plugin-cleanup'
const banner = `
/*
** pixel-flow@${pkg.version}
** https://github.com/JamesNimlos/pixel-flow
**
** Developed by
** - James Nimlos
**
** Licensed under MIT license
*/
`
const plugins = [cleanup(), sourceMaps()]
export default [
{
input: 'src/jquery.js',
external: ['jquery'],
output: [
{
file: 'jquery.js',
format: 'umd',
sourcemap: true,
name: 'pixel-flow',
globals: {
jquery: 'jQuery',
},
banner,
},
],
plugins,
},
{
input: 'src/pixel-flow.js',
output: [
{
file: pkg.module,
format: 'es',
sourcemap: true,
banner,
},
{
file: pkg.main,
format: 'cjs',
sourcemap: true,
banner,
exports: 'auto',
},
],
plugins,
},
]