File tree 2 files changed +25
-27
lines changed
2 files changed +25
-27
lines changed Original file line number Diff line number Diff line change 1
1
/* eslint import/no-extraneous-dependencies: 0 */
2
- import fs from 'fs' ;
3
- import { rollup } from ' rollup' ;
4
- import babel from ' rollup-plugin-babel' ;
5
- import babelPresetEnv from ' @babel/preset-env' ;
6
- import pkg from ' ./package.json' ;
2
+ import fs from "fs" ;
3
+ import { rollup } from " rollup" ;
4
+ import babel from " rollup-plugin-babel" ;
5
+ import babelPresetEnv from " @babel/preset-env" ;
6
+ import pkg from " ./package.json" ;
7
7
8
8
rollup ( {
9
- entry : ' src/index.js' ,
9
+ entry : " src/index.js" ,
10
10
plugins : [
11
11
babel ( {
12
12
presets : [ [ babelPresetEnv , { modules : false } ] ] ,
13
13
babelrc : false ,
14
14
} ) ,
15
15
] ,
16
- } ) . then ( bundle => (
17
- bundle . write ( {
18
- dest : 'validator.js' ,
19
- format : 'umd' ,
20
- moduleName : pkg . name ,
21
- banner : (
22
- `/*!\n${
23
- String ( fs . readFileSync ( './LICENSE' ) )
24
- . trim ( )
25
- . split ( '\n' )
26
- . map ( l => ` * ${ l } ` )
27
- . join ( '\n' )
28
- } \n */`
29
- ) ,
30
- } )
31
- ) ) . catch ( ( e ) => {
32
- process . stderr . write ( `${ e . message } \n` ) ;
33
- process . exit ( 1 ) ;
34
- } ) ;
16
+ } )
17
+ . then ( ( bundle ) =>
18
+ bundle . write ( {
19
+ dest : "validator.js" ,
20
+ format : "umd" ,
21
+ moduleName : pkg . name ,
22
+ banner : `/*!\n${ String ( fs . readFileSync ( "./LICENSE" ) )
23
+ . trim ( )
24
+ . split ( "\n" )
25
+ . map ( ( l ) => ` * ${ l } ` )
26
+ . join ( "\n" ) } \n */`,
27
+ } )
28
+ )
29
+ . catch ( ( e ) => {
30
+ process . stderr . write ( `${ e . message } \n` ) ;
31
+ process . exit ( 1 ) ;
32
+ } ) ;
Original file line number Diff line number Diff line change 48
48
"mocha" : " ^6.2.3" ,
49
49
"nyc" : " ^14.1.0" ,
50
50
"rimraf" : " ^3.0.0" ,
51
- "rollup" : " ^0.43 .0" ,
51
+ "rollup" : " ^0.47 .0" ,
52
52
"rollup-plugin-babel" : " ^4.0.1" ,
53
53
"uglify-js" : " ^3.0.19"
54
54
},
72
72
"node" : " >= 0.10"
73
73
},
74
74
"license" : " MIT"
75
- }
75
+ }
You can’t perform that action at this time.
0 commit comments