Skip to content

Commit

Permalink
fix(material/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 3501881)
  • Loading branch information
alan-agius4 authored and wagnermaciel committed Mar 18, 2022
1 parent cf24b70 commit eed36b3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/material/schematics/collection.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@
"description": "Adds Angular Material to the application without affecting any templates",
"factory": "./ng-add/index",
"schema": "./ng-add/schema.json",
"aliases": ["material-shell", "install"]
"aliases": ["material-shell", "install"],
"hidden": true
},
"ng-add-setup-project": {
"description": "Sets up the specified project after the ng-add dependencies have been installed.",
"private": true,
"factory": "./ng-add/setup-project",
"schema": "./ng-add/schema.json"
"schema": "./ng-add/schema.json",
"hidden": true
},
"dashboard": {
"description": "Create a card-based dashboard component",
Expand Down

0 comments on commit eed36b3

Please sign in to comment.