-
Notifications
You must be signed in to change notification settings - Fork 92
/
rollup.config.js
41 lines (38 loc) · 988 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
// rollup.config.js
import resolve from 'rollup-plugin-node-resolve';
import commonjs from 'rollup-plugin-commonjs';
import json from 'rollup-plugin-json';
import babel from 'rollup-plugin-babel';
import { uglify } from 'rollup-plugin-uglify';
import merge from 'lodash/merge';
const { version } = require('./package.json');
const banner = '/*!\n'
+ ` * TagCloud.js v${version}\n`
+ ` * Copyright (c) 2016-${new Date().getFullYear()} @ Cong Min\n`
+ ' * MIT License - https://github.com/mcc108/TagCloud\n'
+ ' */';
export default [{
output: {
file: 'dist/TagCloud.js',
},
}, {
output: {
file: 'dist/TagCloud.min.js',
},
plugins: [
uglify({ output: { comments: /^!/ } }),
],
}].map((config) => merge({
input: 'src/index.js',
output: {
name: 'TagCloud',
format: 'umd',
banner,
},
plugins: [
resolve(),
babel(),
commonjs(),
json(),
],
}, config));