Skip to content

Commit a61140c

Browse files
author
Angular Builds
committed
92c7674 build: migrate @angular-devkit/schematics-cli to npm_package
1 parent ece7fbd commit a61140c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+560
-383
lines changed

app-shell/schema.d.ts

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
/**
2-
* Generates an application shell for running a server-side version of an app.
2+
* Configures your project to generate an app-shell during build time.
33
*/
44
export interface Schema {
55
/**
6-
* The name of the related client app.
6+
* The name of the project where the app-shell should be generated.
77
*/
88
project: string;
99
/**
10-
* Creates a server application using the Server Routing API (Developer Preview).
10+
* Set up a server application using the Server Routing and App Engine APIs (Developer
11+
* Preview).
1112
*/
1213
serverRouting?: boolean;
1314
}

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
}

application/schema.d.ts

+40-25
Original file line numberDiff line numberDiff line change
@@ -1,84 +1,98 @@
11
/**
2-
* Generates a new basic application definition in the "projects" subfolder of the workspace.
2+
* Generates a new Angular application within your workspace. This schematic sets up the
3+
* foundational structure of your project, including the root component, module, and
4+
* configuration files. You can customize various aspects of the application, such as
5+
* routing, styling, and testing.
36
*/
47
export interface Schema {
58
/**
6-
* Create an application that does not utilize zone.js.
9+
* Generate an application that does not use `zone.js`.
710
*/
811
experimentalZoneless?: boolean;
912
/**
10-
* Include styles inline in the root component.ts file. Only CSS styles can be included
11-
* inline. Default is false, meaning that an external styles file is created and referenced
12-
* in the root component.ts file.
13+
* Include the styles for the root component directly within the `app.component.ts` file.
14+
* Only CSS styles can be included inline. By default, a separate stylesheet file (e.g.,
15+
* `app.component.css`) is created.
1316
*/
1417
inlineStyle?: boolean;
1518
/**
16-
* Include template inline in the root component.ts file. Default is false, meaning that an
17-
* external template file is created and referenced in the root component.ts file.
19+
* Include the HTML template for the root component directly within the `app.component.ts`
20+
* file. By default, a separate template file (e.g., `app.component.html`) is created.
1821
*/
1922
inlineTemplate?: boolean;
2023
/**
21-
* Create a bare-bones project without any testing frameworks. (Use for learning purposes
22-
* only.)
24+
* Generate a minimal project without any testing frameworks. This is intended for learning
25+
* purposes and simple experimentation, not for production applications.
2326
*/
2427
minimal?: boolean;
2528
/**
26-
* The name of the new application.
29+
* The name for the new application. This name will be used for the project directory and
30+
* various identifiers throughout the application's code.
2731
*/
2832
name: string;
2933
/**
30-
* A prefix to apply to generated selectors.
34+
* A prefix to be added to the selectors of components generated within this application.
35+
* For example, if the prefix is `my-app` and you generate a component named `my-component`,
36+
* the selector will be `my-app-my-component`.
3137
*/
3238
prefix?: string;
3339
/**
34-
* The root directory of the new application.
40+
* The directory where the new application's files will be created, relative to the
41+
* workspace root. If not specified, the application will be created in a subfolder within
42+
* the `projects` directory, using the application's name.
3543
*/
3644
projectRoot?: string;
3745
/**
38-
* Creates an application with routing enabled.
46+
* Generate an application with routing already configured. This sets up the necessary files
47+
* and modules for managing navigation between different views in your application.
3948
*/
4049
routing?: boolean;
4150
/**
42-
* Creates a server application using the Server Routing and App Engine APIs (Developer
51+
* Set up a server application using the Server Routing and App Engine APIs (Developer
4352
* Preview).
4453
*/
4554
serverRouting?: boolean;
4655
/**
47-
* Skip installing dependency packages.
56+
* Skip the automatic installation of packages. You will need to manually install the
57+
* dependencies later.
4858
*/
4959
skipInstall?: boolean;
5060
/**
51-
* Do not add dependencies to the "package.json" file.
61+
* Do not add dependencies to the `package.json` file.
5262
*/
5363
skipPackageJson?: boolean;
5464
/**
55-
* Do not create "spec.ts" test files for the application.
65+
* Skip the generation of a unit test files `spec.ts`.
5666
*/
5767
skipTests?: boolean;
5868
/**
59-
* Creates an application with Server-Side Rendering (SSR) and Static Site Generation
60-
* (SSG/Prerendering) enabled.
69+
* Configure the application for Server-Side Rendering (SSR) and Static Site Generation
70+
* (SSG/Prerendering).
6171
*/
6272
ssr?: boolean;
6373
/**
64-
* Creates an application based upon the standalone API, without NgModules.
74+
* Create an application that utilizes the standalone API, eliminating the need for
75+
* NgModules. This can simplify the structure of your application.
6576
*/
6677
standalone?: boolean;
6778
/**
68-
* Creates an application with stricter bundle budgets settings.
79+
* Enable stricter bundle budget settings for the application. This helps to keep your
80+
* application's bundle size small and improve performance. For more information, see
81+
* https://angular.dev/tools/cli/template-typecheck#strict-mode
6982
*/
7083
strict?: boolean;
7184
/**
72-
* The file extension or preprocessor to use for style files.
85+
* The type of stylesheet files to be created for components in the application.
7386
*/
7487
style?: Style;
7588
/**
76-
* The view encapsulation strategy to use in the new application.
89+
* Sets the view encapsulation mode for the application's components. This determines how
90+
* component styles are scoped and applied.
7791
*/
7892
viewEncapsulation?: ViewEncapsulation;
7993
}
8094
/**
81-
* The file extension or preprocessor to use for style files.
95+
* The type of stylesheet files to be created for components in the application.
8296
*/
8397
export declare enum Style {
8498
Css = "css",
@@ -87,7 +101,8 @@ export declare enum Style {
87101
Scss = "scss"
88102
}
89103
/**
90-
* The view encapsulation strategy to use in the new application.
104+
* Sets the view encapsulation mode for the application's components. This determines how
105+
* component styles are scoped and applied.
91106
*/
92107
export declare enum ViewEncapsulation {
93108
Emulated = "Emulated",

application/schema.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
Object.defineProperty(exports, "__esModule", { value: true });
55
exports.ViewEncapsulation = exports.Style = void 0;
66
/**
7-
* The file extension or preprocessor to use for style files.
7+
* The type of stylesheet files to be created for components in the application.
88
*/
99
var Style;
1010
(function (Style) {
@@ -14,7 +14,8 @@ var Style;
1414
Style["Scss"] = "scss";
1515
})(Style || (exports.Style = Style = {}));
1616
/**
17-
* The view encapsulation strategy to use in the new application.
17+
* Sets the view encapsulation mode for the application's components. This determines how
18+
* component styles are scoped and applied.
1819
*/
1920
var ViewEncapsulation;
2021
(function (ViewEncapsulation) {

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
}

class/schema.d.ts

+13-6
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,32 @@
11
/**
2-
* Creates a new, generic class definition in the given project.
2+
* Creates a new class in your project. Classes are the fundamental building blocks for
3+
* object-oriented programming in TypeScript. They provide a blueprint for creating objects
4+
* with properties and methods. This schematic helps you generate a new class with the basic
5+
* structure and optional test files.
36
*/
47
export interface Schema {
58
/**
6-
* The name of the new class.
9+
* The name for the new class. This will be used to create the class file (e.g.,
10+
* `my-class.ts`) and, if enabled, the corresponding test file `my-class.spec.ts`.
711
*/
812
name: string;
913
/**
10-
* The path at which to create the class, relative to the workspace root.
14+
* The path where the class file should be created, relative to the workspace root. If not
15+
* specified, the class will be created in the current directory.
1116
*/
1217
path?: string;
1318
/**
14-
* The name of the project.
19+
* The name of the project where the class should be added. If not specified, the CLI will
20+
* determine the project from the current directory.
1521
*/
1622
project: string;
1723
/**
18-
* Do not create "spec.ts" test files for the new class.
24+
* Skip the generation of a unit test file `spec.ts` for the new class.
1925
*/
2026
skipTests?: boolean;
2127
/**
22-
* Adds a developer-defined type to the filename, in the format "name.type.ts".
28+
* Adds a custom type to the filename, allowing you to create more descriptive class names.
29+
* For example, if you set the type to `helper`, the filename will be `my-class.helper.ts`.
2330
*/
2431
type?: string;
2532
}

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)