File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change 66 "---------- Normal Example -------------------------------------------" : " " ,
77 "generate" : " node ./tools/generate.js" ,
88 "---------- Command Line Example -------------------------------------" : " " ,
9- "commandline" : " node ./tools/generate.js angular-ngrx-store __name__=some-name __model__=some-other-name --outputpath=./src/here --force "
9+ "commandline" : " node ./tools/generate.js angular-ngrx-store __name__=some-name __model__=some-other-name --outputpath=./src/here --overwrite "
1010 },
1111 "devDependencies" : {
1212 "file-name" : " 0.1.0" ,
Original file line number Diff line number Diff line change @@ -71,13 +71,15 @@ export default class GenerateTemplateFiles {
7171 const contentReplacers : IReplacer [ ] = this . _getReplacers ( replacers , contentCase ) ;
7272 const outputPathReplacers : IReplacer [ ] = this . _getReplacers ( replacers , outputPathCase ) ;
7373 const outputPath : string = await this . _getOutputPath ( outputPathReplacers , selectedConfigItem ) ;
74- const shouldWriteFiles : boolean = GenerateTemplateFiles . isCommandLine ? yargs . argv . force === true : await this . _shouldWriteFiles ( outputPath ) ;
74+ const shouldWriteFiles : boolean = GenerateTemplateFiles . isCommandLine
75+ ? yargs . argv . overwrite === true
76+ : await this . _shouldWriteFiles ( outputPath ) ;
7577
7678 if ( shouldWriteFiles === false ) {
7779 console . info ( 'No new files created' ) ;
7880
7981 if ( GenerateTemplateFiles . isCommandLine ) {
80- console . info ( 'Use --force option to overwrite existing files' ) ;
82+ console . info ( 'Use --overwrite option to overwrite existing files' ) ;
8183 }
8284
8385 return ;
You can’t perform that action at this time.
0 commit comments