File tree Expand file tree Collapse file tree 4 files changed +9
-9
lines changed
Expand file tree Collapse file tree 4 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -13,15 +13,15 @@ export default yargs
1313 } )
1414 . option ( 'default' , {
1515 alias : 'd' ,
16- describe : 'Bundled default export.' ,
16+ describe : 'Bundled require default export.' ,
1717 type : 'string'
1818 } )
19- . option ( 'generatedir ' , {
19+ . option ( 'outDir ' , {
2020 alias : 'g' ,
2121 describe : 'Where generate JS files.' ,
2222 type : 'string'
2323 } )
24- . option ( 'requirefile ' , {
24+ . option ( 'requireFile ' , {
2525 alias : 'r' ,
2626 describe : 'Bundled JS main file.' ,
2727 type : 'string'
Original file line number Diff line number Diff line change @@ -39,8 +39,8 @@ class Cli {
3939
4040 private getConfig ( config : Contracts . Config , args : Contracts . Arguments ) {
4141 if ( args . default != null ) config . proxyjs . default = args . default ;
42- if ( args . generatedir != null ) config . proxyjs . generateDir = args . generatedir ;
43- if ( args . requirefile != null ) config . proxyjs . requireFile = args . requirefile ;
42+ if ( args . outDir != null ) config . proxyjs . outDir = args . outDir ;
43+ if ( args . requireFile != null ) config . proxyjs . requireFile = args . requireFile ;
4444 if ( config . baseDir == null ) config . baseDir = '' ;
4545 return config ;
4646 }
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ export interface Config {
44 out : string ;
55 proxyjs : {
66 default : string ;
7- generateDir : string ;
7+ outDir : string ;
88 requireFile : string ;
99 }
1010}
@@ -15,6 +15,6 @@ export interface Arguments {
1515 help : boolean ;
1616 version : boolean ;
1717 default : string ;
18- generatedir : string ;
19- requirefile : string ;
18+ outDir : string ;
19+ requireFile : string ;
2020}
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ export default class Generator {
3737 console . info ( clc . yellow ( 'Generating files:' ) ) ;
3838 matches . forEach ( ( match : string ) => {
3939 let cleanedMatch = this . cleanModule ( match ) ;
40- let fullFilePath = path . join ( process . cwd ( ) , this . config . proxyjs . generateDir , `${ match } .js` ) ;
40+ let fullFilePath = path . join ( process . cwd ( ) , this . config . proxyjs . outDir , `${ match } .js` ) ;
4141 // Make sure that all folders are created.
4242 mkdirp . sync ( path . dirname ( fullFilePath ) ) ;
4343
You can’t perform that action at this time.
0 commit comments