File tree Expand file tree Collapse file tree 1 file changed +26
-19
lines changed Expand file tree Collapse file tree 1 file changed +26
-19
lines changed Original file line number Diff line number Diff line change 1
1
const babel = require ( 'rollup-plugin-babel' ) ;
2
+ const changeCase = require ( 'change-case' ) ;
3
+ const createBanner = require ( 'create-banner' ) ;
2
4
const pkg = require ( './package' ) ;
3
5
4
- const now = new Date ( ) ;
5
- const banner = `/*!
6
- * isArrayBuffer v${ pkg . version }
7
- * https://github.com/${ pkg . repository }
8
- *
9
- * Copyright (c) 2015-${ now . getFullYear ( ) } ${ pkg . author . name }
10
- * Released under the ${ pkg . license } license
11
- *
12
- * Date: ${ now . toISOString ( ) }
13
- */
14
- ` ;
6
+ const name = changeCase . camelCase ( pkg . name ) ;
15
7
16
8
export default {
17
9
input : 'src/index.js' ,
18
10
output : [
19
11
{
20
- banner,
21
- file : 'dist/is-array-buffer.js' ,
12
+ name,
13
+ banner : createBanner ( {
14
+ data : {
15
+ name,
16
+ year : '2015-present' ,
17
+ } ,
18
+ } ) ,
19
+ file : `dist/${ pkg . name } .js` ,
22
20
format : 'umd' ,
23
- name : 'isArrayBuffer' ,
24
21
} ,
25
22
{
26
- banner,
27
- file : 'dist/is-array-buffer.common.js' ,
23
+ name,
24
+ banner : createBanner ( {
25
+ data : {
26
+ name,
27
+ year : '2015-present' ,
28
+ } ,
29
+ template : 'inline' ,
30
+ } ) ,
31
+ file : `dist/${ pkg . name } .min.js` ,
32
+ format : 'umd' ,
33
+ } ,
34
+ {
35
+ file : `dist/${ pkg . name } .common.js` ,
28
36
format : 'cjs' ,
29
37
} ,
30
38
{
31
- banner,
32
- file : 'dist/is-array-buffer.esm.js' ,
33
- format : 'es' ,
39
+ file : `dist/${ pkg . name } .esm.js` ,
40
+ format : 'esm' ,
34
41
} ,
35
42
] ,
36
43
plugins : [
You can’t perform that action at this time.
0 commit comments