UNPKG

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