Skip to content

Commit

Permalink
fix(cdk/schematics): mark ng-add schematics as hidden
Browse files Browse the repository at this point in the history
These schematics are meant to be used with `ng-add` and shouldn't be made visibily. By setting these schematics hidden we don't shown them in the `ng generate` help output.

Now
```
ng generate

Generates and/or modifies files based on a schematic.

Commands:
  ng g <schematic>           Run the provided schematic.                                                                                                                 [default]
  ng g address-form [name]                                                                                    [aliases: address-form, material-address-form, material-addressForm]
  ng g dashboard [name]                                                                                                                              [aliases: material-dashboard]
  ng g navigation [name]                                                                                                                 [aliases: material-nav, materialNav, nav]
  ng g ng-add                                                                                                                                   [aliases: material-shell, install]
  ng g table [name]                                                                                                                                      [aliases: material-table]
  ng g tree [name]                                                                                                                                        [aliases: material-tree]

Arguments:
  schematic  The [collection:schematic] to run.                                                                                                                           [string]

Options:
  --help         Shows a help message for this command in the console.                                                                                                   [boolean]
  --interactive  Enable interactive input prompts.                                                                                                       [boolean] [default: true]
  --dry-run      Run through and reports activity without writing out results.                                                                          [boolean] [default: false]
  --defaults     Disable interactive input prompts for options with a default.                                                                          [boolean] [default: false]
  --force        Force overwriting of existing files.                                                                                                   [boolean] [default: false]
```

After
```
ng generate

Generates and/or modifies files based on a schematic.

Commands:
  ng g <schematic>           Run the provided schematic.                                                                                                                 [default]
  ng g address-form [name]                                                                                    [aliases: address-form, material-address-form, material-addressForm]
  ng g dashboard [name]                                                                                                                              [aliases: material-dashboard]
  ng g navigation [name]                                                                                                                 [aliases: material-nav, materialNav, nav]
  ng g table [name]                                                                                                                                      [aliases: material-table]
  ng g tree [name]                                                                                                                                        [aliases: material-tree]

Arguments:
  schematic  The [collection:schematic] to run.                                                                                                                           [string]

Options:
  --help         Shows a help message for this command in the console.                                                                                                   [boolean]
  --interactive  Enable interactive input prompts.                                                                                                       [boolean] [default: true]
  --dry-run      Run through and reports activity without writing out results.                                                                          [boolean] [default: false]
  --defaults     Disable interactive input prompts for options with a default.                                                                          [boolean] [default: false]
  --force        Force overwriting of existing files.                                                                                                   [boolean] [default: false]
```

(cherry picked from commit fb03164)
  • Loading branch information
alan-agius4 authored and wagnermaciel committed Mar 18, 2022
1 parent 5e5b296 commit cf24b70
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/cdk/schematics/collection.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"description": "Installs the Angular CDK",
"factory": "./ng-add/index",
"schema": "./ng-add/schema.json",
"aliases": ["install"]
"aliases": ["install"],
"hidden": true
},
"drag-drop": {
"description": "Generates a component using the Drag and Drop module",
Expand Down

0 comments on commit cf24b70

Please sign in to comment.