Skip to content

Commit 3c5d601

Browse files
committed
change --force to --overwrite
1 parent 48bbc7e commit 3c5d601

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

examples/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
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",

src/GenerateTemplateFiles.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff 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;

0 commit comments

Comments
 (0)