Skip to content

Commit 67a8271

Browse files
committed
fixup! docs: add generation schematics option docs
1 parent 1fa8658 commit 67a8271

File tree

13 files changed

+74
-61
lines changed

13 files changed

+74
-61
lines changed

packages/schematics/angular/class/schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"path": {
1818
"type": "string",
1919
"format": "path",
20-
"description": "The path at which to create the class, relative to the current workspace. Default is the top level of the current working directory.",
20+
"description": "The path at which to create the class, relative to the workspace root.",
2121
"visible": false
2222
},
2323
"project": {

packages/schematics/angular/component/schema.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@
2828
"x-prompt": "What name would you like to use for the component?"
2929
},
3030
"inlineStyle": {
31-
"description": "When true, include styles inline in the component TS file. Only CSS styles can be included inline. By default, an external styles file is created and referenced in the component TS file.",
31+
"description": "When true, includes styles inline in the component TS file. Only CSS styles can be included inline. By default, an external styles file is created and referenced in the component TS file.",
3232
"type": "boolean",
3333
"default": false,
3434
"alias": "s"
3535
},
3636
"inlineTemplate": {
37-
"description": "When true, include template inline in the component TS file. By default, an external template file is created and referenced in the component TS file.",
37+
"description": "When true, includes template inline in the component TS file. By default, an external template file is created and referenced in the component TS file.",
3838
"type": "boolean",
3939
"default": false,
4040
"alias": "t"
@@ -83,7 +83,7 @@
8383
},
8484
"skipImport": {
8585
"type": "boolean",
86-
"description": "When true, does not import this directive into the owning NgModule.",
86+
"description": "When true, does not import this component into the owning NgModule.",
8787
"default": false
8888
},
8989
"selector": {

packages/schematics/angular/directive/schema.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"id": "SchematicsAngularDirective",
44
"title": "Angular Directive Options Schema",
55
"type": "object",
6+
"description": "Creates a new generic directive definition in the given or default project.",
67
"properties": {
78
"name": {
89
"type": "string",
@@ -16,7 +17,7 @@
1617
"path": {
1718
"type": "string",
1819
"format": "path",
19-
"description": "The path at which to create the interface that defines the directive, relative to the current workspace.",
20+
"description": "The path at which to create the interface that defines the directive, relative to the workspace root.",
2021
"visible": false
2122
},
2223
"project": {

packages/schematics/angular/interface/schema.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"id": "SchematicsAngularInterface",
44
"title": "Angular Interface Options Schema",
55
"type": "object",
6+
"description": "Creates a new generic interface definition in the given or default project.",
67
"properties": {
78
"name": {
89
"type": "string",
@@ -16,7 +17,7 @@
1617
"path": {
1718
"type": "string",
1819
"format": "path",
19-
"description": "The path to create the interface.",
20+
"description": "The path at which to create the interface, relative to the workspace root.",
2021
"visible": false
2122
},
2223
"project": {
@@ -29,11 +30,11 @@
2930
"prefix": {
3031
"type": "string",
3132
"default": "",
32-
"description": "Specifies the prefix to use."
33+
"description": "A prefix to apply to generated selectors."
3334
},
3435
"type": {
3536
"type": "string",
36-
"description": "Specifies the type of interface.",
37+
"description": "Adds a developer-defined type to the filename, in the format \"name.type.ts\".",
3738
"$default": {
3839
"$source": "argv",
3940
"index": 1
@@ -42,7 +43,7 @@
4243
"lintFix": {
4344
"type": "boolean",
4445
"default": false,
45-
"description": "Specifies whether to apply lint fixes after generating the directive."
46+
"description": "When true, applies lint fixes after generating the interface."
4647
}
4748
},
4849
"required": [
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
A library is a type of project that does not run independently.
2+
The library skeleton created by this command is placed by default in the `/projects` folder, and has `type` of "library".
3+
4+
You can build a new library using the `ng build` command, and unit-test it and lint it using the `ng test` and `ng lint` commands.

packages/schematics/angular/library/schema.json

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
"id": "SchematicsLibrary",
44
"title": "Library Options Schema",
55
"type": "object",
6+
"description": "Creates a new generic library project in the current workspace.",
7+
"long-description": "./library-long.md",
68
"properties": {
79
"name": {
810
"type": "string",
@@ -16,30 +18,30 @@
1618
"entryFile": {
1719
"type": "string",
1820
"format": "path",
19-
"description": "The path to create the library's public API file.",
21+
"description": "The path at which to create the library's public API file, relative to the workspace root.",
2022
"default": "public_api"
2123
},
2224
"prefix": {
2325
"type": "string",
2426
"format": "html-selector",
25-
"description": "The prefix to apply to generated selectors.",
27+
"description": "A prefix to apply to generated selectors.",
2628
"default": "lib",
2729
"alias": "p"
2830
},
2931
"skipPackageJson": {
3032
"type": "boolean",
3133
"default": false,
32-
"description": "Do not add dependencies to package.json."
34+
"description": "When true, does not add dependencies to the \"package.json\" file. "
3335
},
3436
"skipInstall": {
35-
"description": "Skip installing dependency packages.",
37+
"description": "When true, does not install dependency packages.",
3638
"type": "boolean",
3739
"default": false
3840
},
3941
"skipTsConfig": {
4042
"type": "boolean",
4143
"default": false,
42-
"description": "Do not update tsconfig.json for development experience."
44+
"description": "When true, does not update \"tsconfig.json\" to add a path mapping for the new library. The path mapping is needed to use the library in an app, but can be disabled here to simplify development."
4345
}
4446
},
4547
"required": []

packages/schematics/angular/module/schema.json

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,21 @@
33
"id": "SchematicsAngularModule",
44
"title": "Angular Module Options Schema",
55
"type": "object",
6+
"description": "Creates a new generic NgModule definition in the given or default project.",
67
"properties": {
78
"name": {
89
"type": "string",
9-
"description": "The name of the module.",
10+
"description": "The name of the NgModule.",
1011
"$default": {
1112
"$source": "argv",
1213
"index": 0
1314
},
14-
"x-prompt": "What name would you like to use for the module?"
15+
"x-prompt": "What name would you like to use for the NgModule?"
1516
},
1617
"path": {
1718
"type": "string",
1819
"format": "path",
19-
"description": "The path to create the module.",
20+
"description": "The path at which to create the NgModule, relative to the workspace root.",
2021
"visible": false
2122
},
2223
"project": {
@@ -28,29 +29,29 @@
2829
},
2930
"routing": {
3031
"type": "boolean",
31-
"description": "Generates a routing module.",
32+
"description": "When true, creates a routing module.",
3233
"default": false
3334
},
3435
"routingScope": {
3536
"enum": ["Child", "Root"],
3637
"type": "string",
37-
"description": "The scope for the generated routing.",
38+
"description": "The scope for the new routing module.",
3839
"default": "Child"
3940
},
4041
"flat": {
4142
"type": "boolean",
42-
"description": "Flag to indicate if a directory is created.",
43+
"description": "When true, creates the new files at the top level of the current project root. ",
4344
"default": false
4445
},
4546
"commonModule": {
4647
"type": "boolean",
47-
"description": "Flag to control whether the CommonModule is imported.",
48+
"description": "When true, the new NgModule imports \"CommonModule\". ",
4849
"default": true,
4950
"visible": false
5051
},
5152
"module": {
5253
"type": "string",
53-
"description": "Allows specification of the declaring module.",
54+
"description": "The declaring NgModule.",
5455
"alias": "m"
5556
}
5657
},

packages/schematics/angular/ng-new/schema.json

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,39 +9,39 @@
99
"description": "The directory name to create the workspace in."
1010
},
1111
"name": {
12-
"description": "The name of the workspace.",
12+
"description": "The name of the new workspace and initial project.",
1313
"type": "string",
1414
"format": "html-selector",
1515
"$default": {
1616
"$source": "argv",
1717
"index": 0
1818
},
19-
"x-prompt": "What name would you like to use for the project?"
19+
"x-prompt": "What name would you like to use for the new workspace and initial project?"
2020
},
2121
"experimentalIvy": {
22-
"description": "EXPERIMENTAL: Specifies whether to create a new application which uses the Ivy rendering engine.",
22+
"description": "EXPERIMENTAL: When true, creates a new app that uses the Ivy rendering engine.",
2323
"type": "boolean",
2424
"default": false
2525
},
2626
"skipInstall": {
27-
"description": "Skip installing dependency packages.",
27+
"description": "When true, does not install dependency packages.",
2828
"type": "boolean",
2929
"default": false
3030
},
3131
"linkCli": {
32-
"description": "Link CLI to global version (internal development only).",
32+
"description": "When true, links CLI to global version (internal development only).",
3333
"type": "boolean",
3434
"default": false,
3535
"visible": false
3636
},
3737
"skipGit": {
38-
"description": "Skip initializing a git repository.",
38+
"description": "When true, does not initialize a git repository.",
3939
"type": "boolean",
4040
"default": false,
4141
"alias": "g"
4242
},
4343
"commit": {
44-
"description": "Initial repository commit information.",
44+
"description": "Initial git repository commit information.",
4545
"oneOf": [
4646
{ "type": "boolean" },
4747
{
@@ -67,24 +67,24 @@
6767
"default": true
6868
},
6969
"newProjectRoot": {
70-
"description": "The path where new projects will be created.",
70+
"description": "The path where new projects will be created, relative to the new workspace root.",
7171
"type": "string",
7272
"default": "projects"
7373
},
7474
"inlineStyle": {
75-
"description": "Specifies if the style will be in the ts file.",
75+
"description": "When true, includes styles inline in the component TS file. By default, an external styles file is created and referenced in the component TS file.",
7676
"type": "boolean",
7777
"default": false,
7878
"alias": "s"
7979
},
8080
"inlineTemplate": {
81-
"description": "Specifies if the template will be in the ts file.",
81+
"description": "When true, includes template inline in the component TS file. By default, an external template file is created and referenced in the component TS file.",
8282
"type": "boolean",
8383
"default": false,
8484
"alias": "t"
8585
},
8686
"viewEncapsulation": {
87-
"description": "Specifies the view encapsulation strategy.",
87+
"description": "The view encapsulation strategy to use in the initial project.",
8888
"enum": ["Emulated", "Native", "None", "ShadowDom"],
8989
"type": "string"
9090
},
@@ -98,20 +98,20 @@
9898
},
9999
"routing": {
100100
"type": "boolean",
101-
"description": "Generates a routing module.",
101+
"description": "When true, generates a routing module for the initial project.",
102102
"default": false,
103103
"x-prompt": "Would you like to add Angular routing?"
104104
},
105105
"prefix": {
106106
"type": "string",
107107
"format": "html-selector",
108-
"description": "The prefix to apply to generated selectors.",
108+
"description": "The prefix to apply to generated selectors for the initial project.",
109109
"minLength": 1,
110110
"default": "app",
111111
"alias": "p"
112112
},
113113
"style": {
114-
"description": "The file extension to be used for style files.",
114+
"description": "The file extension to use for style files.",
115115
"type": "string",
116116
"default": "css",
117117
"x-prompt": {
@@ -127,18 +127,18 @@
127127
}
128128
},
129129
"skipTests": {
130-
"description": "Skip creating spec files.",
130+
"description": "When true, does not generate \"spec.ts\" test files for the new project. ",
131131
"type": "boolean",
132132
"default": false,
133133
"alias": "S"
134134
},
135135
"createApplication": {
136-
"description": "Flag to toggle creation of an application in the new workspace.",
136+
"description": "When true (the default), creates a new initial app project in the new workspace.",
137137
"type": "boolean",
138138
"default": true
139139
},
140140
"minimal": {
141-
"description": "Create a barebones project without any testing frameworks",
141+
"description": "When true, creates a barebones project without any testing frameworks.",
142142
"type": "boolean",
143143
"default": false
144144
}

packages/schematics/angular/pipe/schema.json

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"id": "SchematicsAngularPipe",
44
"title": "Angular Pipe Options Schema",
55
"type": "object",
6+
"description": "Creates a new generic pipe definition in the given or default project.",
67
"properties": {
78
"name": {
89
"type": "string",
@@ -16,7 +17,7 @@
1617
"path": {
1718
"type": "string",
1819
"format": "path",
19-
"description": "The path to create the pipe.",
20+
"description": "The path at which to create the pipe, relative to the workspace root.",
2021
"visible": false
2122
},
2223
"project": {
@@ -29,32 +30,32 @@
2930
"flat": {
3031
"type": "boolean",
3132
"default": true,
32-
"description": "Flag to indicate if a directory is created."
33+
"description": "When true (the default) creates files at the top level of the project."
3334
},
3435
"spec": {
3536
"type": "boolean",
3637
"default": true,
37-
"description": "Specifies if a spec file is generated."
38+
"description": "When true (the default), generates a \"spec.ts\" test file for the new pipe."
3839
},
3940
"skipImport": {
4041
"type": "boolean",
4142
"default": false,
42-
"description": "Allows for skipping the module import."
43+
"description": "When true, does not import this pipe into the owning NgModule."
4344
},
4445
"module": {
4546
"type": "string",
46-
"description": "Allows specification of the declaring module.",
47+
"description": "The declaring NgModule.",
4748
"alias": "m"
4849
},
4950
"export": {
5051
"type": "boolean",
5152
"default": false,
52-
"description": "Specifies if declaring module exports the pipe."
53+
"description": "When true, the declaring NgModule exports this pipe."
5354
},
5455
"lintFix": {
5556
"type": "boolean",
5657
"default": false,
57-
"description": "Specifies whether to apply lint fixes after generating the pipe."
58+
"description": "When true, applies lint fixes after generating the pipe."
5859
}
5960
},
6061
"required": [

packages/schematics/angular/service-worker/schema.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"id": "SchematicsAngularServiceWorker",
44
"title": "Angular Service Worker Options Schema",
55
"type": "object",
6+
"description": "Pass this schematic to the \"run\" command to create a service worker",
67
"properties": {
78
"project": {
89
"type": "string",

0 commit comments

Comments
 (0)