Skip to content

Commit aef81aa

Browse files
committed
bug(help): show correct listing of blueprints for generate help (#2580)
Fixes #2300
1 parent fe1be35 commit aef81aa

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

packages/angular-cli/commands/generate.ts

+1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ const GenerateCommand = EmberGenerateCommand.extend({
3030
const blueprints = blueprintList
3131
.filter(bp => bp.indexOf('-test') === -1)
3232
.filter(bp => bp !== 'ng2')
33+
.filter(bp => bp !== 'mobile')
3334
.map(bp => Blueprint.load(path.join(__dirname, '..', 'blueprints', bp)));
3435

3536
let output = '';

packages/angular-cli/commands/help.ts

+9-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const HelpCommand = Command.extend({
1717

1818
availableOptions: [],
1919

20-
run: function (commandOptions: any) {
20+
run: function (commandOptions: any, rawArgs: any) {
2121
let commandFiles = fs.readdirSync(__dirname)
2222
// Remove files that are not JavaScript or Typescript
2323
.filter(file => file.match(/\.(j|t)s$/) && !file.match(/\.d.ts$/))
@@ -47,7 +47,14 @@ const HelpCommand = Command.extend({
4747
tasks: this.tasks
4848
});
4949

50-
this.ui.writeLine(command.printBasicHelp(commandOptions));
50+
if (rawArgs.length > 0) {
51+
if (cmd === rawArgs[0]) {
52+
this.ui.writeLine(command.printDetailedHelp(commandOptions));
53+
}
54+
} else {
55+
this.ui.writeLine(command.printBasicHelp(commandOptions));
56+
}
57+
5158
});
5259
}
5360
});

0 commit comments

Comments
 (0)