Skip to content

Commit 3c39525

Browse files
committed
docs: add generation schematics option docs
1 parent f52f043 commit 3c39525

File tree

20 files changed

+136
-113
lines changed

20 files changed

+136
-113
lines changed

packages/schematics/angular/app-shell/app-shell-long.md

Whitespace-only changes.

packages/schematics/angular/app-shell/schema.json

+7-5
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,16 @@
33
"id": "SchematicsAngularAppShell",
44
"title": "Angular AppShell Options Schema",
55
"type": "object",
6+
"description": "Generates an app shell for running a server-side version of an app.",
7+
"long-description": "",
68
"properties": {
79
"clientProject": {
810
"type": "string",
9-
"description": "Name of related client app."
11+
"description": "The name of the related client app."
1012
},
1113
"universalProject": {
1214
"type": "string",
13-
"description": "Name of related universal app."
15+
"description": "The name of related Universal app."
1416
},
1517
"route": {
1618
"type": "string",
@@ -20,12 +22,12 @@
2022
"name": {
2123
"type": "string",
2224
"format": "html-selector",
23-
"description": "Name of the universal app"
25+
"description": "The HTML selector of the Universal app"
2426
},
2527
"appId": {
2628
"type": "string",
2729
"format": "html-selector",
28-
"description": "The appId to use withServerTransition.",
30+
"description": "The app ID to use in withServerTransition().",
2931
"default": "serverApp"
3032
},
3133
"outDir": {
@@ -43,7 +45,7 @@
4345
"index": {
4446
"type": "string",
4547
"format": "path",
46-
"description": "Name of the index file",
48+
"description": "The name of the index file",
4749
"default": "index.html"
4850
},
4951
"main": {

packages/schematics/angular/application/schema.json

+13-12
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,15 @@
33
"id": "SchematicsAngularApp",
44
"title": "Angular Application Options Schema",
55
"type": "object",
6+
"description": "Generates a new basic app definition in the \"projects\" subfolder of the workspace.",
67
"properties": {
78
"projectRoot": {
8-
"description": "The root directory of the new application.",
9+
"description": "The root folder of the new app.",
910
"type": "string",
1011
"visible": false
1112
},
1213
"name": {
13-
"description": "The name of the application.",
14+
"description": "The name of the new app.",
1415
"type": "string",
1516
"$default": {
1617
"$source": "argv",
@@ -19,57 +20,57 @@
1920
"x-prompt": "What name would you like to use for the application?"
2021
},
2122
"experimentalIvy": {
22-
"description": "EXPERIMENTAL: Specifies whether to create a new application which uses the Ivy rendering engine.",
23+
"description": "EXPERIMENTAL: True to create a new app that uses the Ivy rendering engine.",
2324
"type": "boolean",
2425
"default": false
2526
},
2627
"inlineStyle": {
27-
"description": "Specifies if the style will be in the ts file.",
28+
"description": "When true, includes styles inline in the root component TS file. Only CSS styles can be included inline. Default is false, meaning that an external styles file is created and referenced in the root component TS file.",
2829
"type": "boolean",
2930
"default": false,
3031
"alias": "s"
3132
},
3233
"inlineTemplate": {
33-
"description": "Specifies if the template will be in the ts file.",
34+
"description": "When true, includes template inline in the root component TS file. Default is false, meaning that an external template file is created and referenced in the root component TS file. ",
3435
"type": "boolean",
3536
"default": false,
3637
"alias": "t"
3738
},
3839
"viewEncapsulation": {
39-
"description": "Specifies the view encapsulation strategy.",
40+
"description": "The view encapsulation strategy to use in the new app.",
4041
"enum": ["Emulated", "Native", "None", "ShadowDom"],
4142
"type": "string"
4243
},
4344
"routing": {
4445
"type": "boolean",
45-
"description": "Generates a routing module.",
46+
"description": "When true, creates a routing NgModule.",
4647
"default": false
4748
},
4849
"prefix": {
4950
"type": "string",
5051
"format": "html-selector",
51-
"description": "The prefix to apply to generated selectors.",
52+
"description": "A prefix to apply to generated selectors.",
5253
"default": "app",
5354
"alias": "p"
5455
},
5556
"style": {
56-
"description": "The file extension to be used for style files.",
57+
"description": "The file extension to use for style files.",
5758
"type": "string",
5859
"default": "css"
5960
},
6061
"skipTests": {
61-
"description": "Skip creating spec files.",
62+
"description": "When true, does not create \"spec.ts\" test files for the app.",
6263
"type": "boolean",
6364
"default": false,
6465
"alias": "S"
6566
},
6667
"skipPackageJson": {
6768
"type": "boolean",
6869
"default": false,
69-
"description": "Do not add dependencies to package.json."
70+
"description": "When true, does not add dependencies to the \"package.json\" file."
7071
},
7172
"minimal": {
72-
"description": "Create a barebones project without any testing frameworks",
73+
"description": "When true, creates a bare-bones project without any testing frameworks.",
7374
"type": "boolean",
7475
"default": false
7576
}

packages/schematics/angular/class/schema.json

+5-4
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@
33
"id": "SchematicsAngularClass",
44
"title": "Angular Class Options Schema",
55
"type": "object",
6+
"description": "Creates a new generic class definition in the given or default project.",
67
"properties": {
78
"name": {
89
"type": "string",
9-
"description": "The name of the class.",
10+
"description": "The name of the new class.",
1011
"$default": {
1112
"$source": "argv",
1213
"index": 0
@@ -16,7 +17,7 @@
1617
"path": {
1718
"type": "string",
1819
"format": "path",
19-
"description": "The path to create the class.",
20+
"description": "The path at which to create the class, relative to the workspace root.",
2021
"visible": false
2122
},
2223
"project": {
@@ -28,12 +29,12 @@
2829
},
2930
"spec": {
3031
"type": "boolean",
31-
"description": "Specifies if a spec file is generated.",
32+
"description": "When true, generates a \"spec.ts\" test file for the new class.",
3233
"default": false
3334
},
3435
"type": {
3536
"type": "string",
36-
"description": "Specifies the type of class.",
37+
"description": "Adds a developer-defined type to the filename, in the format \"name.type.ts\".",
3738
"default": ""
3839
}
3940
},

packages/schematics/angular/component/schema.json

+16-15
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@
33
"id": "SchematicsAngularComponent",
44
"title": "Angular Component Options Schema",
55
"type": "object",
6+
"description": "Creates a new generic component definition in the given or default project.",
67
"properties": {
78
"path": {
89
"type": "string",
910
"format": "path",
10-
"description": "The path to create the component.",
11+
"description": "The path at which to create the component file, relative to the current workspace. Default is a folder with the same name as the component in the project root.",
1112
"visible": false
1213
},
1314
"project": {
@@ -27,33 +28,33 @@
2728
"x-prompt": "What name would you like to use for the component?"
2829
},
2930
"inlineStyle": {
30-
"description": "Specifies if the style will be in the 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.",
3132
"type": "boolean",
3233
"default": false,
3334
"alias": "s"
3435
},
3536
"inlineTemplate": {
36-
"description": "Specifies if the template will be in the 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.",
3738
"type": "boolean",
3839
"default": false,
3940
"alias": "t"
4041
},
4142
"viewEncapsulation": {
42-
"description": "Specifies the view encapsulation strategy.",
43+
"description": "The view encapsulation strategy to use in the new component.",
4344
"enum": ["Emulated", "Native", "None", "ShadowDom"],
4445
"type": "string",
4546
"alias": "v"
4647
},
4748
"changeDetection": {
48-
"description": "Specifies the change detection strategy.",
49+
"description": "The change detection strategy to use in the new component.",
4950
"enum": ["Default", "OnPush"],
5051
"type": "string",
5152
"default": "Default",
5253
"alias": "c"
5354
},
5455
"prefix": {
5556
"type": "string",
56-
"description": "The prefix to apply to generated selectors.",
57+
"description": "The prefix to apply to the generated component selector.",
5758
"alias": "p",
5859
"oneOf": [
5960
{
@@ -66,49 +67,49 @@
6667
]
6768
},
6869
"styleext": {
69-
"description": "The file extension to be used for style files.",
70+
"description": "The file extension to use for style files.",
7071
"type": "string",
7172
"default": "css"
7273
},
7374
"spec": {
7475
"type": "boolean",
75-
"description": "Specifies if a spec file is generated.",
76+
"description": "When true (the default), generates a \"spec.ts\" test file for the new component.",
7677
"default": true
7778
},
7879
"flat": {
7980
"type": "boolean",
80-
"description": "Flag to indicate if a directory is created.",
81+
"description": "When true, creates the new files at the top level of the current project.",
8182
"default": false
8283
},
8384
"skipImport": {
8485
"type": "boolean",
85-
"description": "Flag to skip the module import.",
86+
"description": "When true, does not import this component into the owning NgModule.",
8687
"default": false
8788
},
8889
"selector": {
8990
"type": "string",
9091
"format": "html-selector",
91-
"description": "The selector to use for the component."
92+
"description": "The HTML selector to use for this component."
9293
},
9394
"module": {
9495
"type": "string",
95-
"description": "Allows specification of the declaring module.",
96+
"description": "The declaring NgModule.",
9697
"alias": "m"
9798
},
9899
"export": {
99100
"type": "boolean",
100101
"default": false,
101-
"description": "Specifies if declaring module exports the component."
102+
"description": "When true, the declaring NgModule exports this component."
102103
},
103104
"entryComponent": {
104105
"type": "boolean",
105106
"default": false,
106-
"description": "Specifies if the component is an entry component of declaring module."
107+
"description": "When true, the new component is the entry component of the declaring NgModule."
107108
},
108109
"lintFix": {
109110
"type": "boolean",
110111
"default": false,
111-
"description": "Specifies whether to apply lint fixes after generating the component."
112+
"description": "When true, applies lint fixes after generating the component."
112113
}
113114
},
114115
"required": [

packages/schematics/angular/directive/schema.json

+11-10
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@
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",
9-
"description": "The name of the directive.",
10+
"description": "The name of the new directive.",
1011
"$default": {
1112
"$source": "argv",
1213
"index": 0
@@ -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 that defines the directive, relative to the workspace root.",
2021
"visible": false
2122
},
2223
"project": {
@@ -28,7 +29,7 @@
2829
},
2930
"prefix": {
3031
"type": "string",
31-
"description": "The prefix to apply to generated selectors.",
32+
"description": "A prefix to apply to generated selectors.",
3233
"alias": "p",
3334
"oneOf": [
3435
{
@@ -42,38 +43,38 @@
4243
},
4344
"spec": {
4445
"type": "boolean",
45-
"description": "Specifies if a spec file is generated.",
46+
"description": "When true (the default), generates a \"spec.ts\" test file for the new directive.",
4647
"default": true
4748
},
4849
"skipImport": {
4950
"type": "boolean",
50-
"description": "Flag to skip the module import.",
51+
"description": "When true, does not import this directive into the owning NgModule.",
5152
"default": false
5253
},
5354
"selector": {
5455
"type": "string",
5556
"format": "html-selector",
56-
"description": "The selector to use for the directive."
57+
"description": "The HTML selector to use for this directive."
5758
},
5859
"flat": {
5960
"type": "boolean",
60-
"description": "Flag to indicate if a directory is created.",
61+
"description": "When true (the default), creates the new files at the top level of the current project.",
6162
"default": true
6263
},
6364
"module": {
6465
"type": "string",
65-
"description": "Allows specification of the declaring module.",
66+
"description": "The declaring NgModule.",
6667
"alias": "m"
6768
},
6869
"export": {
6970
"type": "boolean",
7071
"default": false,
71-
"description": "Specifies if declaring module exports the directive."
72+
"description": "When true, the declaring NgModule exports this directive."
7273
},
7374
"lintFix": {
7475
"type": "boolean",
7576
"default": false,
76-
"description": "Specifies whether to apply lint fixes after generating the directive."
77+
"description": "When true, applies lint fixes after generating the directive."
7778
}
7879
},
7980
"required": [
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
The e2e tests are created in a separate app, next to the project being tested in the `projects` folder of the workspace.

packages/schematics/angular/e2e/schema.json

+5-3
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,16 @@
33
"id": "SchematicsAngularE2eApp",
44
"title": "Angular e2e Application Options Schema",
55
"type": "object",
6+
"description": "Generates a new, generic end-to-end test definition for the given or default project.",
7+
"long-description": "e2e-long.md",
68
"properties": {
79
"projectRoot": {
8-
"description": "The root directory of the new application.",
10+
"description": "The root folder for the new test app.",
911
"type": "string",
1012
"visible": false
1113
},
1214
"name": {
13-
"description": "The name of the e2e application.",
15+
"description": "The name of the new e2e app.",
1416
"type": "string",
1517
"format": "html-selector",
1618
"$default": {
@@ -19,7 +21,7 @@
1921
}
2022
},
2123
"rootSelector": {
22-
"description": "HTML selector for the root component.",
24+
"description": "The HTML selector for the root component of the test app.",
2325
"type": "string",
2426
"default": "app-root"
2527
},

0 commit comments

Comments
 (0)