Skip to content

Commit

Permalink
fix(@angular/cli): ng g show descrption from collection.json if n…
Browse files Browse the repository at this point in the history
…ot 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
  • Loading branch information
alan-agius4 authored and dgp1130 committed Mar 18, 2022
1 parent 5ac6fd3 commit 8e66c91
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions packages/angular/cli/src/commands/generate/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,16 +68,21 @@ export class GenerateCommandModule

for (const schematicName of schematicNames) {
const {
description: { schemaJson, aliases: schematicAliases, hidden: schematicHidden },
description: {
schemaJson,
aliases: schematicAliases,
hidden: schematicHidden,
description: schematicDescription,
},
} = collection.createSchematic(schematicName, true);

if (!schemaJson) {
continue;
}

const {
description,
'x-deprecated': xDeprecated,
description = schematicDescription,
aliases = schematicAliases,
hidden = schematicHidden,
} = schemaJson;
Expand Down

0 comments on commit 8e66c91

Please sign in to comment.