This repository has been archived by the owner on May 9, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 246
/
Copy pathrollup.config.js
60 lines (59 loc) · 1.67 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
import progress from 'rollup-plugin-progress'
import postcss from 'rollup-plugin-postcss'
import cssnext from 'postcss-cssnext'
import buble from 'rollup-plugin-buble'
import html from 'rollup-plugin-html'
import autoprefixer from 'autoprefixer'
import clean from 'postcss-clean'
import atImport from 'postcss-import'
import nodeResolve from 'rollup-plugin-node-resolve'
import replace from 'rollup-plugin-replace'
import commonJs from 'rollup-plugin-commonjs'
import license from 'rollup-plugin-license'
var pkg = require('./package.json')
/**
* Created by peak on 2017/1/6.
*/
export default {
entry: 'src/index.js',
dest: 'dist/vue-html5-editor.js',
format: 'umd',
moduleName: "VueHtml5Editor",
plugins: [
license({
banner: `Vue-html5-editor ${pkg.version}\n${pkg.repository.url}\nbuild at ${new Date()}`
}),
progress({
clearLine: false
}),
replace({
VERSION: JSON.stringify(pkg.version)
}),
postcss({
plugins: [
atImport(),
cssnext({
warnForDuplicates: false
}),
autoprefixer(),
clean()
],
extensions: ['.css', '.pcss']
}),
html({
include: '**/*.html',
htmlMinifierOptions: {
collapseWhitespace: true,
collapseBooleanAttributes: true,
conservativeCollapse: true
}
}),
commonJs({
include: 'node_modules/lrz/**'
}),
nodeResolve({jsnext: true}),
buble({
include: '**/*.js'
})
]
}