File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5353 "rollup-plugin-preserve-shebang" : " ^0.1.3" ,
5454 "rollup-plugin-sizes" : " ^0.4.2" ,
5555 "rollup-plugin-uglify" : " ^2.0.1" ,
56+ "uppercamelcase" : " ^3.0.0" ,
5657 "yargs" : " ^10.0.3"
5758 },
5859 "devDependencies" : {
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 pascalCase from 'uppercamelcase' ;
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 => pascalCase ( 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