Skip to content

Commit 50066a3

Browse files
committed
docs: enhance descriptions for schematics options
Refined and clarified the descriptions for various schematics options to improve their readability and accuracy. These changes aim to make the documentation more user-friendly and accessible for developers. Closes #25571 (cherry picked from commit 8ba6b28)
1 parent 230f636 commit 50066a3

File tree

23 files changed

+174
-171
lines changed

23 files changed

+174
-171
lines changed

packages/angular/pwa/pwa/schema.json

+4-3
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,23 @@
33
"$id": "SchematicsAngularPWA",
44
"title": "Angular PWA Options Schema",
55
"type": "object",
6+
"description": "Transforms your Angular application into a Progressive Web App (PWA). PWAs provide a native app-like experience, allowing users to install your app on their devices and access it offline. This schematic configures your project for PWA functionality, adding a service worker, a web app manifest, and other necessary features.",
67
"properties": {
78
"project": {
89
"type": "string",
9-
"description": "The name of the project.",
10+
"description": "The name of the project to transform into a PWA. If not specified, the CLI will determine the project from the current directory.",
1011
"$default": {
1112
"$source": "projectName"
1213
}
1314
},
1415
"target": {
1516
"type": "string",
16-
"description": "The target to apply service worker to.",
17+
"description": "The build target to apply the service worker to. This is typically `build`, indicating that the service worker should be generated during the standard build process.",
1718
"default": "build"
1819
},
1920
"title": {
2021
"type": "string",
21-
"description": "The title of the application."
22+
"description": "The title of the application. This will be used in the web app manifest, which is a JSON file that provides metadata about your PWA (e.g., name, icons, display options)."
2223
}
2324
},
2425
"required": []

packages/angular/ssr/schematics/ng-add/schema.json

+4-3
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,22 @@
33
"$id": "SchematicsAngularNgAddSSR",
44
"title": "Angular SSR Options Schema",
55
"type": "object",
6+
"description": "Adds Server-Side Rendering (SSR) capabilities to an existing Angular application. SSR allows your app to be rendered on the server, leading to faster initial load times and improved SEO. This schematic modifies your project to enable SSR, sets up the necessary configurations, and installs the required dependencies.",
67
"properties": {
78
"project": {
89
"type": "string",
9-
"description": "The name of the project.",
10+
"description": "The name of the project you want to enable SSR for. If not specified, the CLI will determine the project from the current directory.",
1011
"$default": {
1112
"$source": "projectName"
1213
}
1314
},
1415
"skipInstall": {
15-
"description": "Skip installing dependency packages.",
16+
"description": "Skip the automatic installation of packages. You will need to manually install the dependencies later.",
1617
"type": "boolean",
1718
"default": false
1819
},
1920
"serverRouting": {
20-
"description": "Creates a server application using the Server Routing and App Engine APIs (Developer Preview).",
21+
"description": "Configure the server application to use the Angular Server Routing API and App Engine APIs (currently in Developer Preview).",
2122
"type": "boolean"
2223
}
2324
},

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

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,18 @@
33
"$id": "SchematicsAngularAppShell",
44
"title": "Angular AppShell Options Schema",
55
"type": "object",
6-
"description": "Generates an application shell for running a server-side version of an app.",
6+
"description": "Configures your project to generate an app-shell during build time.",
77
"additionalProperties": false,
88
"properties": {
99
"project": {
1010
"type": "string",
11-
"description": "The name of the related client app.",
11+
"description": "The name of the project where the app-shell should be generated.",
1212
"$default": {
1313
"$source": "projectName"
1414
}
1515
},
1616
"serverRouting": {
17-
"description": "Creates a server application using the Server Routing API (Developer Preview).",
17+
"description": "Set up a server application using the Server Routing and App Engine APIs (Developer Preview).",
1818
"type": "boolean",
1919
"default": false
2020
}

packages/schematics/angular/application/schema.json

+18-18
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
"$id": "SchematicsAngularApp",
44
"title": "Angular Application Options Schema",
55
"type": "object",
6-
"description": "Generates a new basic application definition in the \"projects\" subfolder of the workspace.",
6+
"description": "Generates a new Angular application within your workspace. This schematic sets up the foundational structure of your project, including the root component, module, and configuration files. You can customize various aspects of the application, such as routing, styling, and testing.",
77
"additionalProperties": false,
88
"properties": {
99
"projectRoot": {
10-
"description": "The root directory of the new application.",
10+
"description": "The directory where the new application's files will be created, relative to the workspace root. If not specified, the application will be created in a subfolder within the `projects` directory, using the application's name.",
1111
"type": "string"
1212
},
1313
"name": {
14-
"description": "The name of the new application.",
14+
"description": "The name for the new application. This name will be used for the project directory and various identifiers throughout the application's code.",
1515
"type": "string",
1616
"pattern": "^(?:@[a-zA-Z0-9-*~][a-zA-Z0-9-*._~]*/)?[a-zA-Z0-9-~][a-zA-Z0-9-._~]*$",
1717
"$default": {
@@ -21,37 +21,37 @@
2121
"x-prompt": "What name would you like to use for the application?"
2222
},
2323
"inlineStyle": {
24-
"description": "Include 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.",
24+
"description": "Include the styles for the root component directly within the `app.component.ts` file. Only CSS styles can be included inline. By default, a separate stylesheet file (e.g., `app.component.css`) is created.",
2525
"type": "boolean",
2626
"alias": "s",
2727
"x-user-analytics": "ep.ng_inline_style"
2828
},
2929
"inlineTemplate": {
30-
"description": "Include 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. ",
30+
"description": "Include the HTML template for the root component directly within the `app.component.ts` file. By default, a separate template file (e.g., `app.component.html`) is created.",
3131
"type": "boolean",
3232
"alias": "t",
3333
"x-user-analytics": "ep.ng_inline_template"
3434
},
3535
"viewEncapsulation": {
36-
"description": "The view encapsulation strategy to use in the new application.",
36+
"description": "Sets the view encapsulation mode for the application's components. This determines how component styles are scoped and applied.",
3737
"enum": ["Emulated", "None", "ShadowDom"],
3838
"type": "string"
3939
},
4040
"routing": {
4141
"type": "boolean",
42-
"description": "Creates an application with routing enabled.",
42+
"description": "Generate an application with routing already configured. This sets up the necessary files and modules for managing navigation between different views in your application.",
4343
"default": true,
4444
"x-user-analytics": "ep.ng_routing"
4545
},
4646
"prefix": {
4747
"type": "string",
4848
"format": "html-selector",
49-
"description": "A prefix to apply to generated selectors.",
49+
"description": "A prefix to be added to the selectors of components generated within this application. For example, if the prefix is `my-app` and you generate a component named `my-component`, the selector will be `my-app-my-component`.",
5050
"default": "app",
5151
"alias": "p"
5252
},
5353
"style": {
54-
"description": "The file extension or preprocessor to use for style files.",
54+
"description": "The type of stylesheet files to be created for components in the application.",
5555
"type": "string",
5656
"default": "css",
5757
"enum": ["css", "scss", "sass", "less"],
@@ -80,50 +80,50 @@
8080
"x-user-analytics": "ep.ng_style"
8181
},
8282
"skipTests": {
83-
"description": "Do not create \"spec.ts\" test files for the application.",
83+
"description": "Skip the generation of a unit test files `spec.ts`.",
8484
"type": "boolean",
8585
"default": false,
8686
"alias": "S"
8787
},
8888
"skipPackageJson": {
8989
"type": "boolean",
9090
"default": false,
91-
"description": "Do not add dependencies to the \"package.json\" file."
91+
"description": "Do not add dependencies to the `package.json` file."
9292
},
9393
"minimal": {
94-
"description": "Create a bare-bones project without any testing frameworks. (Use for learning purposes only.)",
94+
"description": "Generate a minimal project without any testing frameworks. This is intended for learning purposes and simple experimentation, not for production applications.",
9595
"type": "boolean",
9696
"default": false
9797
},
9898
"skipInstall": {
99-
"description": "Skip installing dependency packages.",
99+
"description": "Skip the automatic installation of packages. You will need to manually install the dependencies later.",
100100
"type": "boolean",
101101
"default": false
102102
},
103103
"strict": {
104-
"description": "Creates an application with stricter bundle budgets settings.",
104+
"description": "Enable stricter bundle budget settings for the application. This helps to keep your application's bundle size small and improve performance. For more information, see https://angular.dev/tools/cli/template-typecheck#strict-mode",
105105
"type": "boolean",
106106
"default": true
107107
},
108108
"standalone": {
109-
"description": "Creates an application based upon the standalone API, without NgModules.",
109+
"description": "Create an application that utilizes the standalone API, eliminating the need for NgModules. This can simplify the structure of your application.",
110110
"type": "boolean",
111111
"default": true,
112112
"x-user-analytics": "ep.ng_standalone"
113113
},
114114
"ssr": {
115-
"description": "Creates an application with Server-Side Rendering (SSR) and Static Site Generation (SSG/Prerendering) enabled.",
115+
"description": "Configure the application for Server-Side Rendering (SSR) and Static Site Generation (SSG/Prerendering).",
116116
"x-prompt": "Do you want to enable Server-Side Rendering (SSR) and Static Site Generation (SSG/Prerendering)?",
117117
"type": "boolean",
118118
"default": false,
119119
"x-user-analytics": "ep.ng_ssr"
120120
},
121121
"serverRouting": {
122-
"description": "Creates a server application using the Server Routing and App Engine APIs (Developer Preview).",
122+
"description": "Set up a server application using the Server Routing and App Engine APIs (Developer Preview).",
123123
"type": "boolean"
124124
},
125125
"experimentalZoneless": {
126-
"description": "Create an application that does not utilize zone.js.",
126+
"description": "Generate an application that does not use `zone.js`.",
127127
"type": "boolean",
128128
"default": false
129129
}

packages/schematics/angular/class/schema.json

+6-6
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
"$id": "SchematicsAngularClass",
44
"title": "Angular Class Options Schema",
55
"type": "object",
6-
"description": "Creates a new, generic class definition in the given project.",
6+
"description": "Creates a new class in your project. Classes are the fundamental building blocks for object-oriented programming in TypeScript. They provide a blueprint for creating objects with properties and methods. This schematic helps you generate a new class with the basic structure and optional test files.",
77
"additionalProperties": false,
88
"properties": {
99
"name": {
1010
"type": "string",
11-
"description": "The name of the new class.",
11+
"description": "The name for the new class. This will be used to create the class file (e.g., `my-class.ts`) and, if enabled, the corresponding test file `my-class.spec.ts`.",
1212
"$default": {
1313
"$source": "argv",
1414
"index": 0
@@ -21,24 +21,24 @@
2121
"$default": {
2222
"$source": "workingDirectory"
2323
},
24-
"description": "The path at which to create the class, relative to the workspace root.",
24+
"description": "The path where the class file should be created, relative to the workspace root. If not specified, the class will be created in the current directory.",
2525
"visible": false
2626
},
2727
"project": {
2828
"type": "string",
29-
"description": "The name of the project.",
29+
"description": "The name of the project where the class should be added. If not specified, the CLI will determine the project from the current directory.",
3030
"$default": {
3131
"$source": "projectName"
3232
}
3333
},
3434
"skipTests": {
3535
"type": "boolean",
36-
"description": "Do not create \"spec.ts\" test files for the new class.",
36+
"description": "Skip the generation of a unit test file `spec.ts` for the new class.",
3737
"default": false
3838
},
3939
"type": {
4040
"type": "string",
41-
"description": "Adds a developer-defined type to the filename, in the format \"name.type.ts\"."
41+
"description": "Adds a custom type to the filename, allowing you to create more descriptive class names. For example, if you set the type to `helper`, the filename will be `my-class.helper.ts`."
4242
}
4343
},
4444
"required": ["name", "project"]

0 commit comments

Comments
 (0)