1 | # Schematics CLI
|
2 |
|
3 | This package contains the executable for running a [Schematic](/packages/angular_devkit/schematics/README.md).
|
4 |
|
5 | # Usage
|
6 |
|
7 | ```
|
8 | $ schematics [CollectionName:]SchematicName [options, ...]
|
9 |
|
10 | By default, if the collection name is not specified, use the internal collection provided
|
11 | by the Schematics CLI.
|
12 |
|
13 | Options:
|
14 | --debug Debug mode. This is true by default if the collection is a relative
|
15 | path (in that case, turn off with --debug=false).
|
16 |
|
17 | --allow-private Allow private schematics to be run from the command line. Default to
|
18 | false.
|
19 |
|
20 | --dry-run Do not output anything, but instead just show what actions would be
|
21 | performed. Default to true if debug is also true.
|
22 |
|
23 | --force Force overwriting files that would otherwise be an error.
|
24 |
|
25 | --list-schematics List all schematics from the collection, by name. A collection name
|
26 | should be suffixed by a colon. Example: '@angular-devkit/schematics-cli:'.
|
27 |
|
28 | --no-interactive Disables interactive input prompts.
|
29 |
|
30 | --verbose Show more information.
|
31 |
|
32 | --help Show this message.
|
33 |
|
34 | Any additional option is passed to the Schematics depending on its schema.
|
35 | ```
|
36 |
|
37 | # Examples
|
38 |
|
39 | 1. Create a new NPM package that contains a blank schematic.
|
40 |
|
41 | ```sh
|
42 | $ schematics blank <name>
|
43 | ```
|
44 |
|
45 | 2. Walkthrough example that demonstrates how to build a schematic.
|
46 |
|
47 | ```sh
|
48 | $ schematics schematic --name <name>
|
49 | ```
|