Skip to content

Commit 8e66c91

Browse files
alan-agius4dgp1130
authored andcommitted
fix(@angular/cli): ng g show descrption from collection.json if not present in schema.json
Wiht this change we show the descrption from `collection.json` if not present in schematic `schema.json` in `ng generate` help output
1 parent 5ac6fd3 commit 8e66c91

File tree

1 file changed

+7
-2
lines changed
  • packages/angular/cli/src/commands/generate

1 file changed

+7
-2
lines changed

packages/angular/cli/src/commands/generate/cli.ts

+7-2
Original file line numberDiff line numberDiff line change
@@ -68,16 +68,21 @@ export class GenerateCommandModule
6868

6969
for (const schematicName of schematicNames) {
7070
const {
71-
description: { schemaJson, aliases: schematicAliases, hidden: schematicHidden },
71+
description: {
72+
schemaJson,
73+
aliases: schematicAliases,
74+
hidden: schematicHidden,
75+
description: schematicDescription,
76+
},
7277
} = collection.createSchematic(schematicName, true);
7378

7479
if (!schemaJson) {
7580
continue;
7681
}
7782

7883
const {
79-
description,
8084
'x-deprecated': xDeprecated,
85+
description = schematicDescription,
8186
aliases = schematicAliases,
8287
hidden = schematicHidden,
8388
} = schemaJson;

0 commit comments

Comments
 (0)