8000 chore(new): prevent generation of .gitignore when using --skip-git (#… · davinkevin/angular-cli@78ee47c · GitHub
[go: up one dir, main page]

Skip to content

Commit 78ee47c

Browse files
Broccohansl
authored andcommitted
chore(new): prevent generation of .gitignore when using --skip-git (angular#3713)
1 parent 193313d commit 78ee47c

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

packages/angular-cli/blueprints/ng2/index.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ module.exports = {
1313
{ name: 'mobile', type: Boolean, default: false },
1414
{ name: 'routing', type: Boolean, default: false },
1515
{ name: 'inline-style', type: Boolean, default: false, aliases: ['is'] },
16-
{ name: 'inline-template', type: Boolean, default: false, aliases: ['it'] }
16+
{ name: 'inline-template', type: Boolean, default: false, aliases: ['it'] },
17+
{ name: 'skip-git', type: Boolean, default: false, aliases: ['sg'] }
1718
],
1819

1920
beforeInstall: function(options) {
@@ -72,6 +73,9 @@ module.exports = {
7273
if (this.options && this< 8000 /span>.options.inlineStyle) {
7374
fileList = fileList.filter(p => p.indexOf('app.component.__styleext__') < 0);
7475
}
76+
if (this.options && this.options.skipGit) {
77+
fileList = fileList.filter(p => p.indexOf('gitignore') < 0);
78+
}
7579

7680
return fileList;
7781
},

packages/angular-cli/commands/init.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,8 @@ const InitCommand: any = Command.extend({
9292
routing: commandOptions.routing,
9393
inlineStyle: commandOptions.inlineStyle,
9494
inlineTemplate: commandOptions.inlineTemplate,
95-
ignoredUpdateFiles: ['favicon.ico']
95+
ignoredUpdateFiles: ['favicon.ico'],
96+
skipGit: commandOptions.skipGit
9697
};
9798

9899
if (!validProjectName(packageName)) {

0 commit comments

Comments
 (0)
0