Skip to content

Add and edit docs for generate subcommands #12743

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file.
12 changes: 7 additions & 5 deletions packages/schematics/angular/app-shell/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,16 @@
"id": "SchematicsAngularAppShell",
"title": "Angular AppShell Options Schema",
"type": "object",
"description": "Generates an app shell for running a server-side version of an app.",
"long-description": "",
"properties": {
"clientProject": {
"type": "string",
"description": "Name of related client app."
"description": "The name of the related client app."
},
"universalProject": {
"type": "string",
"description": "Name of related universal app."
"description": "The name of related Universal app."
},
"route": {
"type": "string",
Expand All @@ -20,12 +22,12 @@
"name": {
"type": "string",
"format": "html-selector",
"description": "Name of the universal app"
"description": "The HTML selector of the Universal app"
},
"appId": {
"type": "string",
"format": "html-selector",
"description": "The appId to use withServerTransition.",
"description": "The app ID to use in withServerTransition().",
"default": "serverApp"
},
"outDir": {
Expand All @@ -43,7 +45,7 @@
"index": {
"type": "string",
"format": "path",
"description": "Name of the index file",
"description": "The name of the index file",
"default": "index.html"
},
"main": {
Expand Down
25 changes: 13 additions & 12 deletions packages/schematics/angular/application/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@
"id": "SchematicsAngularApp",
"title": "Angular Application Options Schema",
"type": "object",
"description": "Generates a new basic app definition in the \"projects\" subfolder of the workspace.",
"properties": {
"projectRoot": {
"description": "The root directory of the new application.",
"description": "The root directory of the new app.",
"type": "string",
"visible": false
},
"name": {
"description": "The name of the application.",
"description": "The name of the new app.",
"type": "string",
"$default": {
"$source": "argv",
Expand All @@ -19,57 +20,57 @@
"x-prompt": "What name would you like to use for the application?"
},
"experimentalIvy": {
"description": "EXPERIMENTAL: Specifies whether to create a new application which uses the Ivy rendering engine.",
"description": "EXPERIMENTAL: True to create a new app that uses the Ivy rendering engine.",
"type": "boolean",
"default": false
},
"inlineStyle": {
"description": "Specifies if the style will be in the ts file.",
"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.",
"type": "boolean",
"default": false,
"alias": "s"
},
"inlineTemplate": {
"description": "Specifies if the template will be in the ts file.",
"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. ",
"type": "boolean",
"default": false,
"alias": "t"
},
"viewEncapsulation": {
"description": "Specifies the view encapsulation strategy.",
"description": "The view encapsulation strategy to use in the new app.",
"enum": ["Emulated", "Native", "None", "ShadowDom"],
"type": "string"
},
"routing": {
"type": "boolean",
"description": "Generates a routing module.",
"description": "When true, creates a routing NgModule.",
"default": false
},
"prefix": {
"type": "string",
"format": "html-selector",
"description": "The prefix to apply to generated selectors.",
"description": "A prefix to apply to generated selectors.",
"default": "app",
"alias": "p"
},
"style": {
"description": "The file extension to be used for style files.",
"description": "The file extension to use for style files.",
"type": "string",
"default": "css"
},
"skipTests": {
"description": "Skip creating spec files.",
"description": "When true, does not create \"spec.ts\" test files for the app.",
"type": "boolean",
"default": false,
"alias": "S"
},
"skipPackageJson": {
"type": "boolean",
"default": false,
"description": "Do not add dependencies to package.json."
"description": "When true, does not add dependencies to the \"package.json\" file."
},
"minimal": {
"description": "Create a barebones project without any testing frameworks",
"description": "When true, creates a bare-bones project without any testing frameworks.",
"type": "boolean",
"default": false
}
Expand Down
9 changes: 5 additions & 4 deletions packages/schematics/angular/class/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
"id": "SchematicsAngularClass",
"title": "Angular Class Options Schema",
"type": "object",
"description": "Creates a new generic class definition in the given or default project.",
"properties": {
"name": {
"type": "string",
"description": "The name of the class.",
"description": "The name of the new class.",
"$default": {
"$source": "argv",
"index": 0
Expand All @@ -16,7 +17,7 @@
"path": {
"type": "string",
"format": "path",
"description": "The path to create the class.",
"description": "The path at which to create the class, relative to the workspace root.",
"visible": false
},
"project": {
Expand All @@ -28,12 +29,12 @@
},
"spec": {
"type": "boolean",
"description": "Specifies if a spec file is generated.",
"description": "When true, generates a \"spec.ts\" test file for the new class.",
"default": false
},
"type": {
"type": "string",
"description": "Specifies the type of class.",
"description": "Adds a developer-defined type to the filename, in the format \"name.type.ts\".",
"default": ""
}
},
Expand Down
31 changes: 16 additions & 15 deletions packages/schematics/angular/component/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
"id": "SchematicsAngularComponent",
"title": "Angular Component Options Schema",
"type": "object",
"description": "Creates a new generic component definition in the given or default project.",
"properties": {
"path": {
"type": "string",
"format": "path",
"description": "The path to create the component.",
"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.",
"visible": false
},
"project": {
Expand All @@ -27,33 +28,33 @@
"x-prompt": "What name would you like to use for the component?"
},
"inlineStyle": {
"description": "Specifies if the style will be in the ts file.",
"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.",
"type": "boolean",
"default": false,
"alias": "s"
},
"inlineTemplate": {
"description": "Specifies if the template will be in the ts file.",
"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.",
"type": "boolean",
"default": false,
"alias": "t"
},
"viewEncapsulation": {
"description": "Specifies the view encapsulation strategy.",
"description": "The view encapsulation strategy to use in the new component.",
"enum": ["Emulated", "Native", "None", "ShadowDom"],
"type": "string",
"alias": "v"
},
"changeDetection": {
"description": "Specifies the change detection strategy.",
"description": "The change detection strategy to use in the new component.",
"enum": ["Default", "OnPush"],
"type": "string",
"default": "Default",
"alias": "c"
},
"prefix": {
"type": "string",
"description": "The prefix to apply to generated selectors.",
"description": "The prefix to apply to the generated component selector.",
"alias": "p",
"oneOf": [
{
Expand All @@ -66,49 +67,49 @@
]
},
"styleext": {
"description": "The file extension to be used for style files.",
"description": "The file extension to use for style files.",
"type": "string",
"default": "css"
},
"spec": {
"type": "boolean",
"description": "Specifies if a spec file is generated.",
"description": "When true (the default), generates a \"spec.ts\" test file for the new component.",
"default": true
},
"flat": {
"type": "boolean",
"description": "Flag to indicate if a directory is created.",
"description": "When true, creates the new files at the top level of the current project.",
"default": false
},
"skipImport": {
"type": "boolean",
"description": "Flag to skip the module import.",
"description": "When true, does not import this component into the owning NgModule.",
"default": false
},
"selector": {
"type": "string",
"format": "html-selector",
"description": "The selector to use for the component."
"description": "The HTML selector to use for this component."
},
"module": {
"type": "string",
"description": "Allows specification of the declaring module.",
"description": "The declaring NgModule.",
"alias": "m"
},
"export": {
"type": "boolean",
"default": false,
"description": "Specifies if declaring module exports the component."
"description": "When true, the declaring NgModule exports this component."
},
"entryComponent": {
"type": "boolean",
"default": false,
"description": "Specifies if the component is an entry component of declaring module."
"description": "When true, the new component is the entry component of the declaring NgModule."
},
"lintFix": {
"type": "boolean",
"default": false,
"description": "Specifies whether to apply lint fixes after generating the component."
"description": "When true, applies lint fixes after generating the component."
}
},
"required": [
Expand Down
21 changes: 11 additions & 10 deletions packages/schematics/angular/directive/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
"id": "SchematicsAngularDirective",
"title": "Angular Directive Options Schema",
"type": "object",
"description": "Creates a new generic directive definition in the given or default project.",
"properties": {
"name": {
"type": "string",
"description": "The name of the directive.",
"description": "The name of the new directive.",
"$default": {
"$source": "argv",
"index": 0
Expand All @@ -16,7 +17,7 @@
"path": {
"type": "string",
"format": "path",
"description": "The path to create the interface.",
"description": "The path at which to create the interface that defines the directive, relative to the workspace root.",
"visible": false
},
"project": {
Expand All @@ -28,7 +29,7 @@
},
"prefix": {
"type": "string",
"description": "The prefix to apply to generated selectors.",
"description": "A prefix to apply to generated selectors.",
"alias": "p",
"oneOf": [
{
Expand All @@ -42,38 +43,38 @@
},
"spec": {
"type": "boolean",
"description": "Specifies if a spec file is generated.",
"description": "When true (the default), generates a \"spec.ts\" test file for the new directive.",
"default": true
},
"skipImport": {
"type": "boolean",
"description": "Flag to skip the module import.",
"description": "When true, does not import this directive into the owning NgModule.",
"default": false
},
"selector": {
"type": "string",
"format": "html-selector",
"description": "The selector to use for the directive."
"description": "The HTML selector to use for this directive."
},
"flat": {
"type": "boolean",
"description": "Flag to indicate if a directory is created.",
"description": "When true (the default), creates the new files at the top level of the current project.",
"default": true
},
"module": {
"type": "string",
"description": "Allows specification of the declaring module.",
"description": "The declaring NgModule.",
"alias": "m"
},
"export": {
"type": "boolean",
"default": false,
"description": "Specifies if declaring module exports the directive."
"description": "When true, the declaring NgModule exports this directive."
},
"lintFix": {
"type": "boolean",
"default": false,
"description": "Specifies whether to apply lint fixes after generating the directive."
"description": "When true, applies lint fixes after generating the directive."
}
},
"required": [
Expand Down
1 change: 1 addition & 0 deletions packages/schematics/angular/e2e/e2e-long.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The e2e tests are created in a separate app, next to the project being tested in the `projects` folder of the workspace.
8 changes: 5 additions & 3 deletions packages/schematics/angular/e2e/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,16 @@
"id": "SchematicsAngularE2eApp",
"title": "Angular e2e Application Options Schema",
"type": "object",
"description": "Generates a new, generic end-to-end test definition for the given or default project.",
"long-description": "e2e-long.md",
"properties": {
"projectRoot": {
"description": "The root directory of the new application.",
"description": "The root folder for the new test app.",
"type": "string",
"visible": false
},
"name": {
"description": "The name of the e2e application.",
"description": "The name of the new e2e app.",
"type": "string",
"format": "html-selector",
"$default": {
Expand All @@ -19,7 +21,7 @@
}
},
"rootSelector": {
"description": "HTML selector for the root component.",
"description": "The HTML selector for the root component of the test app.",
"type": "string",
"default": "app-root"
},
Expand Down
Loading