File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3535 "acorn-jsx" : " 4.1.0" ,
3636 "asyncro" : " ^2.0.1" ,
3737 "babel-polyfill" : " ^6.26.0" ,
38+ "camelcase" : " ^4.1.0" ,
3839 "chalk" : " ^2.3.0" ,
3940 "es6-promisify" : " ^5.0.0" ,
4041 "glob" : " ^7.1.2" ,
Original file line number Diff line number Diff line change @@ -16,12 +16,13 @@ import gzipSize from 'gzip-size';
1616import prettyBytes from 'pretty-bytes' ;
1717import shebangPlugin from 'rollup-plugin-preserve-shebang' ;
1818import flow from 'rollup-plugin-flow' ;
19+ import camelCase from 'camelcase' ;
1920
2021const readFile = promisify ( fs . readFile ) ;
2122const stat = promisify ( fs . stat ) ;
2223const isDir = name => stat ( name ) . then ( stats => stats . isDirectory ( ) ) . catch ( ( ) => false ) ;
2324const isFile = name => stat ( name ) . then ( stats => stats . isFile ( ) ) . catch ( ( ) => false ) ;
24- const safeVariableName = name => name . replace ( / (?: ^ [ ^ a - z $ _ ] | ( [ ^ a - z 0 - 9 _ $ ] + ) ) / g, '_' ) ;
25+ const safeVariableName = name => camelCase ( name . toLowerCase ( ) . replace ( / ( ( ^ [ ^ a - z A - Z ] + ) | [ ^ \w . - ] ) | ( [ ^ a - z A - Z 0 - 9 ] + $ ) / g, '' ) ) ;
2526
2627const FORMATS = [ 'es' , 'cjs' , 'umd' ] ;
2728
You can’t perform that action at this time.
0 commit comments