Skip to content

Commit 0b959d1

Browse files
hanslvikerman
authored andcommitted
* fix(@angular/cli): remove helpJson and help-json mentions (#12331)
* fix(@angular/cli): remove helpJson and help-json mentions * ci: use proper --help=json for creating snapshot
1 parent 72032f8 commit 0b959d1

File tree

4 files changed

+3
-4
lines changed

4 files changed

+3
-4
lines changed

packages/angular/cli/models/architect-command.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ export abstract class ArchitectCommand<
9393
}
9494

9595
if ((!targetSpec.project || !targetSpec.target) && !this.multiTarget) {
96-
if (options.help || options.helpJson) {
96+
if (options.help) {
9797
// This is a special case where we just return.
9898
return;
9999
}

packages/angular/cli/models/command.ts

-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ import {
2121

2222
export interface BaseCommandOptions {
2323
help?: boolean | string;
24-
helpJson?: boolean;
2524
}
2625

2726
export abstract class Command<T extends BaseCommandOptions = BaseCommandOptions> {

packages/angular/cli/models/interface.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ export enum OptionType {
7171
}
7272

7373
/**
74-
* An option description. This is exposed when using `ng --help-json`.
74+
* An option description. This is exposed when using `ng --help=json`.
7575
*/
7676
export interface Option {
7777
/**

scripts/snapshots.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ export default async function(opts: SnapshotsOptions, logger: logging.Logger) {
9696
for (const commandName of Object.keys(commands)) {
9797
const options = { cwd: newProjectRoot };
9898
const childLogger = logger.createChild(commandName);
99-
const stdout = _exec(ngPath, [commandName, '--help-json'], options, childLogger);
99+
const stdout = _exec(ngPath, [commandName, '--help=json'], options, childLogger);
100100
if (stdout.trim()) {
101101
fs.writeFileSync(path.join(helpOutputRoot, commandName + '.json'), stdout);
102102
}

0 commit comments

Comments
 (0)