Skip to content

Commit

Permalink
docs: enhance descriptions for schematics options
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
alan-agius4 committed Jan 15, 2025
1 parent 230f636 commit 50066a3
Show file tree
Hide file tree
Showing 23 changed files with 174 additions and 171 deletions.
7 changes: 4 additions & 3 deletions packages/angular/pwa/pwa/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,23 @@
"$id": "SchematicsAngularPWA",
"title": "Angular PWA Options Schema",
"type": "object",
"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.",
"properties": {
"project": {
"type": "string",
"description": "The name of the project.",
"description": "The name of the project to transform into a PWA. If not specified, the CLI will determine the project from the current directory.",
"$default": {
"$source": "projectName"
}
},
"target": {
"type": "string",
"description": "The target to apply service worker to.",
"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.",
"default": "build"
},
"title": {
"type": "string",
"description": "The title of the application."
"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)."
}
},
"required": []
Expand Down
7 changes: 4 additions & 3 deletions packages/angular/ssr/schematics/ng-add/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,22 @@
"$id": "SchematicsAngularNgAddSSR",
"title": "Angular SSR Options Schema",
"type": "object",
"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.",
"properties": {
"project": {
"type": "string",
"description": "The name of the project.",
"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.",
"$default": {
"$source": "projectName"
}
},
"skipInstall": {
"description": "Skip installing dependency packages.",
"description": "Skip the automatic installation of packages. You will need to manually install the dependencies later.",
"type": "boolean",
"default": false
},
"serverRouting": {
"description": "Creates a server application using the Server Routing and App Engine APIs (Developer Preview).",
"description": "Configure the server application to use the Angular Server Routing API and App Engine APIs (currently in Developer Preview).",
"type": "boolean"
}
},
Expand Down
6 changes: 3 additions & 3 deletions packages/schematics/angular/app-shell/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@
"$id": "SchematicsAngularAppShell",
"title": "Angular AppShell Options Schema",
"type": "object",
"description": "Generates an application shell for running a server-side version of an app.",
"description": "Configures your project to generate an app-shell during build time.",
"additionalProperties": false,
"properties": {
"project": {
"type": "string",
"description": "The name of the related client app.",
"description": "The name of the project where the app-shell should be generated.",
"$default": {
"$source": "projectName"
}
},
"serverRouting": {
"description": "Creates a server application using the Server Routing API (Developer Preview).",
"description": "Set up a server application using the Server Routing and App Engine APIs (Developer Preview).",
"type": "boolean",
"default": false
}
Expand Down
36 changes: 18 additions & 18 deletions packages/schematics/angular/application/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
"$id": "SchematicsAngularApp",
"title": "Angular Application Options Schema",
"type": "object",
"description": "Generates a new basic application definition in the \"projects\" subfolder of the workspace.",
"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.",
"additionalProperties": false,
"properties": {
"projectRoot": {
"description": "The root directory of the new application.",
"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.",
"type": "string"
},
"name": {
"description": "The name of the new application.",
"description": "The name for the new application. This name will be used for the project directory and various identifiers throughout the application's code.",
"type": "string",
"pattern": "^(?:@[a-zA-Z0-9-*~][a-zA-Z0-9-*._~]*/)?[a-zA-Z0-9-~][a-zA-Z0-9-._~]*$",
"$default": {
Expand All @@ -21,37 +21,37 @@
"x-prompt": "What name would you like to use for the application?"
},
"inlineStyle": {
"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.",
"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.",
"type": "boolean",
"alias": "s",
"x-user-analytics": "ep.ng_inline_style"
},
"inlineTemplate": {
"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. ",
"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.",
"type": "boolean",
"alias": "t",
"x-user-analytics": "ep.ng_inline_template"
},
"viewEncapsulation": {
"description": "The view encapsulation strategy to use in the new application.",
"description": "Sets the view encapsulation mode for the application's components. This determines how component styles are scoped and applied.",
"enum": ["Emulated", "None", "ShadowDom"],
"type": "string"
},
"routing": {
"type": "boolean",
"description": "Creates an application with routing enabled.",
"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.",
"default": true,
"x-user-analytics": "ep.ng_routing"
},
"prefix": {
"type": "string",
"format": "html-selector",
"description": "A prefix to apply to generated selectors.",
"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`.",
"default": "app",
"alias": "p"
},
"style": {
"description": "The file extension or preprocessor to use for style files.",
"description": "The type of stylesheet files to be created for components in the application.",
"type": "string",
"default": "css",
"enum": ["css", "scss", "sass", "less"],
Expand Down Expand Up @@ -80,50 +80,50 @@
"x-user-analytics": "ep.ng_style"
},
"skipTests": {
"description": "Do not create \"spec.ts\" test files for the application.",
"description": "Skip the generation of a unit test files `spec.ts`.",
"type": "boolean",
"default": false,
"alias": "S"
},
"skipPackageJson": {
"type": "boolean",
"default": false,
"description": "Do not add dependencies to the \"package.json\" file."
"description": "Do not add dependencies to the `package.json` file."
},
"minimal": {
"description": "Create a bare-bones project without any testing frameworks. (Use for learning purposes only.)",
"description": "Generate a minimal project without any testing frameworks. This is intended for learning purposes and simple experimentation, not for production applications.",
"type": "boolean",
"default": false
},
"skipInstall": {
"description": "Skip installing dependency packages.",
"description": "Skip the automatic installation of packages. You will need to manually install the dependencies later.",
"type": "boolean",
"default": false
},
"strict": {
"description": "Creates an application with stricter bundle budgets settings.",
"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",
"type": "boolean",
"default": true
},
"standalone": {
"description": "Creates an application based upon the standalone API, without NgModules.",
"description": "Create an application that utilizes the standalone API, eliminating the need for NgModules. This can simplify the structure of your application.",
"type": "boolean",
"default": true,
"x-user-analytics": "ep.ng_standalone"
},
"ssr": {
"description": "Creates an application with Server-Side Rendering (SSR) and Static Site Generation (SSG/Prerendering) enabled.",
"description": "Configure the application for Server-Side Rendering (SSR) and Static Site Generation (SSG/Prerendering).",
"x-prompt": "Do you want to enable Server-Side Rendering (SSR) and Static Site Generation (SSG/Prerendering)?",
"type": "boolean",
"default": false,
"x-user-analytics": "ep.ng_ssr"
},
"serverRouting": {
"description": "Creates a server application using the Server Routing and App Engine APIs (Developer Preview).",
"description": "Set up a server application using the Server Routing and App Engine APIs (Developer Preview).",
"type": "boolean"
},
"experimentalZoneless": {
"description": "Create an application that does not utilize zone.js.",
"description": "Generate an application that does not use `zone.js`.",
"type": "boolean",
"default": false
}
Expand Down
12 changes: 6 additions & 6 deletions packages/schematics/angular/class/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
"$id": "SchematicsAngularClass",
"title": "Angular Class Options Schema",
"type": "object",
"description": "Creates a new, generic class definition in the given project.",
"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.",
"additionalProperties": false,
"properties": {
"name": {
"type": "string",
"description": "The name of the new class.",
"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`.",
"$default": {
"$source": "argv",
"index": 0
Expand All @@ -21,24 +21,24 @@
"$default": {
"$source": "workingDirectory"
},
"description": "The path at which to create the class, relative to the workspace root.",
"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.",
"visible": false
},
"project": {
"type": "string",
"description": "The name of the project.",
"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.",
"$default": {
"$source": "projectName"
}
},
"skipTests": {
"type": "boolean",
"description": "Do not create \"spec.ts\" test files for the new class.",
"description": "Skip the generation of a unit test file `spec.ts` for the new class.",
"default": false
},
"type": {
"type": "string",
"description": "Adds a developer-defined type to the filename, in the format \"name.type.ts\"."
"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`."
}
},
"required": ["name", "project"]
Expand Down
Loading

0 comments on commit 50066a3

Please sign in to comment.