Skip to content

Commit

Permalink
* fix(@angular/cli): remove helpJson and help-json mentions (#12331)
Browse files Browse the repository at this point in the history
* fix(@angular/cli): remove helpJson and help-json mentions

* ci: use proper --help=json for creating snapshot
  • Loading branch information
hansl authored and vikerman committed Sep 20, 2018
1 parent 72032f8 commit 0b959d1
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/angular/cli/models/architect-command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export abstract class ArchitectCommand<
}

if ((!targetSpec.project || !targetSpec.target) && !this.multiTarget) {
if (options.help || options.helpJson) {
if (options.help) {
// This is a special case where we just return.
return;
}
Expand Down
1 change: 0 additions & 1 deletion packages/angular/cli/models/command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import {

export interface BaseCommandOptions {
help?: boolean | string;
helpJson?: boolean;
}

export abstract class Command<T extends BaseCommandOptions = BaseCommandOptions> {
Expand Down
2 changes: 1 addition & 1 deletion packages/angular/cli/models/interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export enum OptionType {
}

/**
* An option description. This is exposed when using `ng --help-json`.
* An option description. This is exposed when using `ng --help=json`.
*/
export interface Option {
/**
Expand Down
2 changes: 1 addition & 1 deletion scripts/snapshots.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export default async function(opts: SnapshotsOptions, logger: logging.Logger) {
for (const commandName of Object.keys(commands)) {
const options = { cwd: newProjectRoot };
const childLogger = logger.createChild(commandName);
const stdout = _exec(ngPath, [commandName, '--help-json'], options, childLogger);
const stdout = _exec(ngPath, [commandName, '--help=json'], options, childLogger);
if (stdout.trim()) {
fs.writeFileSync(path.join(helpOutputRoot, commandName + '.json'), stdout);
}
Expand Down

0 comments on commit 0b959d1

Please sign in to comment.