forked from hugeinc/component-carousel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrollup.config.js
54 lines (51 loc) · 1.09 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
import buble from 'rollup-plugin-buble';
import uglify from 'rollup-plugin-uglify';
import { minify } from 'uglify-es';
import * as fs from 'fs';
const license = fs.readFileSync('LICENSE', 'utf8');
export default [{
input: 'src/carousel.js',
output: [
{
file: 'dist/carousel.cjs.js',
format: 'cjs',
banner: '/*!\n' + license + '*/'
}, {
file: 'dist/carousel.es6.js',
format: 'es',
banner: '/*!\n' + license + '*/'
}, {
file: 'dist/carousel.js',
format: 'iife',
name: 'Carousel',
banner: '/*!\n' + license + '*/'
},
],
plugins: [
buble()
]
}, {
input: 'src/carousel.js',
output: [
{
file: 'dist/carousel.min.js',
format: 'iife',
name: 'Carousel',
banner: '/*!\n' + license + '*/'
}
],
plugins: [
buble(),
uglify({
output: {
comments: function(node, comment) {
var text = comment.value;
var type = comment.type;
if (type == "comment2") {
return /^!/i.test(text);
}
}
}
}, minify)
]
}];