Skip to content

Commit

Permalink
bug(help): show correct listing of blueprints for generate help (#2580)
Browse files Browse the repository at this point in the history
Fixes #2300
  • Loading branch information
Brocco authored Oct 10, 2016
1 parent dbdf46c commit fbc585b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions packages/angular-cli/commands/generate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ const GenerateCommand = EmberGenerateCommand.extend({
const blueprints = blueprintList
.filter(bp => bp.indexOf('-test') === -1)
.filter(bp => bp !== 'ng2')
.filter(bp => bp !== 'mobile')
.map(bp => Blueprint.load(path.join(__dirname, '..', 'blueprints', bp)));

let output = '';
Expand Down
11 changes: 9 additions & 2 deletions packages/angular-cli/commands/help.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const HelpCommand = Command.extend({

availableOptions: [],

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

this.ui.writeLine(command.printBasicHelp(commandOptions));
if (rawArgs.length > 0) {
if (cmd === rawArgs[0]) {
this.ui.writeLine(command.printDetailedHelp(commandOptions));
}
} else {
this.ui.writeLine(command.printBasicHelp(commandOptions));
}

});
}
});
Expand Down

0 comments on commit fbc585b

Please sign in to comment.