1 |
|
2 | const resolve= require('rollup-plugin-node-resolve')
|
3 | const commonjs= require('rollup-plugin-commonjs')
|
4 | const json= require('rollup-plugin-json')
|
5 | const minify= require('rollup-plugin-babel-minify')
|
6 | const pkg= require('./package.json')
|
7 |
|
8 | const banner = `/*
|
9 | ${pkg.name} v${pkg.version}
|
10 | https://github.com/cdll/whenx
|
11 | Released under the MIT License.
|
12 | */`
|
13 |
|
14 | module.exports= [{
|
15 | input: 'src/main.js'
|
16 | ,output: [
|
17 | {
|
18 | file: 'whenx.js'
|
19 | , format: 'iife'
|
20 | , sourcemap: false
|
21 | ,banner: banner
|
22 | ,strict: true
|
23 | ,freeze: false
|
24 | ,name: 'whenx'
|
25 | }
|
26 | ]
|
27 | ,plugins: [
|
28 | json()
|
29 | ,resolve({})
|
30 | ,commonjs({})
|
31 | ]
|
32 | }, {
|
33 | input: 'src/main.js'
|
34 | ,output: [
|
35 | {
|
36 | file: 'whenx.min.js'
|
37 | , format: 'iife'
|
38 | , sourcemap: true
|
39 | ,indent: false
|
40 | ,banner: banner
|
41 | ,strict: false
|
42 | ,freeze: false
|
43 | ,silent: true
|
44 | ,name: 'whenx'
|
45 | }
|
46 | ]
|
47 | ,plugins: [
|
48 | json()
|
49 | ,resolve({})
|
50 | ,commonjs({})
|
51 | ,minify({
|
52 | comments: false
|
53 | })
|
54 | ]
|
55 | }]
|