-
Notifications
You must be signed in to change notification settings - Fork 23
/
rollup.config.js
122 lines (119 loc) · 2.63 KB
/
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
import { uglify } from 'rollup-plugin-uglify';
import eslint from 'rollup-plugin-eslint';
var license = "/*!\n* MarchingSquaresJS\n* version 1.3.3\n* https://github.com/RaumZeit/MarchingSquares.js\n*\n* @license GNU Affero General Public License.\n* Copyright (c) 2015-" + (new Date()).getFullYear() + " Ronny Lorenz <[email protected]>\n*/\n\n"
var uglify_options = {
output: {
comments: function(node, comment) {
var text = comment.value;
var type = comment.type;
if (type == "comment2") {
// multiline comment
return /@preserve|@license|@cc_on/i.test(text);
}
}
}
};
export default [
{
input: 'src/main.js',
output: {
name: 'MarchingSquaresJS',
file: 'dist/marchingsquares-esm.js',
format: 'es',
banner: license
},
plugins: [ eslint() ]
},
{
input: 'src/main.js',
output: {
extend: true,
name: 'MarchingSquaresJS',
file: 'dist/marchingsquares.js',
format: 'umd',
banner: license
}
},
{
input: 'src/main.js',
output: {
extend: true,
name: 'MarchingSquaresJS',
file: 'dist/marchingsquares.min.js',
format: 'umd',
banner: license
},
plugins: [
uglify(uglify_options)
]
},
{
input: 'src/isobands.js',
output: {
name: 'MarchingSquaresJS',
file: 'dist/marchingsquares-isobands.js',
format: 'umd',
extend: true,
banner: license
}
},
{
input: 'src/isobands.js',
output: {
name: 'MarchingSquaresJS',
file: 'dist/marchingsquares-isobands.min.js',
format: 'umd',
extend: true,
banner: license
},
plugins: [
uglify(uglify_options)
]
},
{
input: 'src/isolines.js',
output: {
name: 'MarchingSquaresJS',
file: 'dist/marchingsquares-isolines.js',
format: 'umd',
extend: true,
banner: license
}
},
{
input: 'src/isolines.js',
output: {
name: 'MarchingSquaresJS',
file: 'dist/marchingsquares-isolines.min.js',
format: 'umd',
extend: true,
banner: license
},
plugins: [
uglify(uglify_options)
]
},
{
input: 'src/isolines.js',
output: {
name: 'MarchingSquaresJS',
file: 'dist/marchingsquares-isocontours.js',
format: 'umd',
extend: true,
banner: license
}
},
{
input: 'src/isolines.js',
output: {
name: 'MarchingSquaresJS',
file: 'dist/marchingsquares-isocontours.min.js',
format: 'umd',
extend: true,
banner: license
},
plugins: [
uglify(uglify_options)
]
}
];