@schematics/angular 19.1.0-next.2 → 19.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/app-shell/schema.d.ts +4 -3
- package/app-shell/schema.json +3 -3
- package/application/schema.d.ts +40 -25
- package/application/schema.js +3 -2
- package/application/schema.json +18 -18
- package/class/schema.d.ts +13 -6
- package/class/schema.json +6 -6
- package/component/schema.d.ts +47 -29
- package/component/schema.js +5 -4
- package/component/schema.json +21 -21
- package/config/schema.d.ts +6 -4
- package/config/schema.js +1 -1
- package/config/schema.json +3 -3
- package/directive/schema.d.ts +25 -13
- package/directive/schema.json +12 -12
- package/enum/schema.d.ts +11 -6
- package/enum/schema.json +5 -5
- package/environments/schema.d.ts +5 -2
- package/environments/schema.json +2 -2
- package/guard/schema.d.ts +18 -9
- package/guard/schema.json +8 -8
- package/interceptor/schema.d.ts +16 -7
- package/interceptor/schema.json +7 -7
- package/interface/schema.d.ts +14 -6
- package/interface/schema.json +6 -6
- package/library/index.js +3 -3
- package/library/schema.d.ts +22 -10
- package/library/schema.json +9 -9
- package/migrations/use-application-builder/migration.js +4 -0
- package/ng-new/schema.d.ts +51 -31
- package/ng-new/schema.js +5 -2
- package/ng-new/schema.json +20 -20
- package/package.json +3 -3
- package/pipe/schema.d.ts +21 -10
- package/pipe/schema.json +10 -10
- package/resolver/schema.d.ts +15 -8
- package/resolver/schema.json +8 -8
- package/server/schema.d.ts +7 -4
- package/server/schema.json +4 -4
- package/service/schema.d.ts +12 -6
- package/service/schema.json +6 -6
- package/service-worker/schema.d.ts +7 -3
- package/service-worker/schema.json +3 -3
- package/ssr/schema.d.ts +12 -4
- package/ssr/schema.json +4 -3
- package/utility/latest-versions/package.json +2 -2
- package/utility/latest-versions.d.ts +1 -0
- package/utility/latest-versions.js +3 -2
- package/utility/workspace-models.d.ts +1 -0
- package/utility/workspace-models.js +1 -0
- package/web-worker/schema.d.ts +11 -5
- package/web-worker/schema.json +5 -5
- package/workspace/schema.d.ts +15 -10
- package/workspace/schema.js +1 -1
- package/workspace/schema.json +6 -6
package/interceptor/schema.d.ts
CHANGED
|
@@ -1,29 +1,38 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Creates a new
|
|
2
|
+
* Creates a new interceptor in your project. Interceptors are used to intercept and modify
|
|
3
|
+
* HTTP requests and responses before they reach their destination. This allows you to
|
|
4
|
+
* perform tasks like adding authentication headers, handling errors, or logging requests.
|
|
5
|
+
* This schematic generates the necessary files and boilerplate code for a new interceptor.
|
|
3
6
|
*/
|
|
4
7
|
export interface Schema {
|
|
5
8
|
/**
|
|
6
|
-
*
|
|
9
|
+
* Creates the new interceptor files at the top level of the current project. If set to
|
|
10
|
+
* false, a new folder with the interceptor's name will be created to contain the files.
|
|
7
11
|
*/
|
|
8
12
|
flat?: boolean;
|
|
9
13
|
/**
|
|
10
|
-
* Creates the interceptor as a `HttpInterceptorFn
|
|
14
|
+
* Creates the interceptor as a function `HttpInterceptorFn` instead of a class. Functional
|
|
15
|
+
* interceptors can be simpler for basic scenarios.
|
|
11
16
|
*/
|
|
12
17
|
functional?: boolean;
|
|
13
18
|
/**
|
|
14
|
-
* The name
|
|
19
|
+
* The name for the new interceptor. This will be used to create the interceptor's class and
|
|
20
|
+
* spec files (e.g., `my-interceptor.interceptor.ts` and
|
|
21
|
+
* `my-interceptor.interceptor.spec.ts`).
|
|
15
22
|
*/
|
|
16
23
|
name: string;
|
|
17
24
|
/**
|
|
18
|
-
* The path
|
|
25
|
+
* The path where the interceptor files should be created, relative to the workspace root.
|
|
26
|
+
* If not provided, the interceptor will be created in the current directory.
|
|
19
27
|
*/
|
|
20
28
|
path?: string;
|
|
21
29
|
/**
|
|
22
|
-
* The name of the project.
|
|
30
|
+
* The name of the project where the interceptor should be created. If not specified, the
|
|
31
|
+
* CLI will determine the project from the current directory.
|
|
23
32
|
*/
|
|
24
33
|
project: string;
|
|
25
34
|
/**
|
|
26
|
-
*
|
|
35
|
+
* Skip the generation of a unit test file `spec.ts` for the new interceptor.
|
|
27
36
|
*/
|
|
28
37
|
skipTests?: boolean;
|
|
29
38
|
}
|
package/interceptor/schema.json
CHANGED
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
"title": "Angular Interceptor Options Schema",
|
|
5
5
|
"type": "object",
|
|
6
6
|
"additionalProperties": false,
|
|
7
|
-
"description": "Creates a new,
|
|
7
|
+
"description": "Creates a new interceptor in your project. Interceptors are used to intercept and modify HTTP requests and responses before they reach their destination. This allows you to perform tasks like adding authentication headers, handling errors, or logging requests. This schematic generates the necessary files and boilerplate code for a new interceptor.",
|
|
8
8
|
"properties": {
|
|
9
9
|
"name": {
|
|
10
10
|
"type": "string",
|
|
11
|
-
"description": "The name
|
|
11
|
+
"description": "The name for the new interceptor. This will be used to create the interceptor's class and spec files (e.g., `my-interceptor.interceptor.ts` and `my-interceptor.interceptor.spec.ts`).",
|
|
12
12
|
"$default": {
|
|
13
13
|
"$source": "argv",
|
|
14
14
|
"index": 0
|
|
@@ -21,12 +21,12 @@
|
|
|
21
21
|
"$default": {
|
|
22
22
|
"$source": "workingDirectory"
|
|
23
23
|
},
|
|
24
|
-
"description": "The path
|
|
24
|
+
"description": "The path where the interceptor files should be created, relative to the workspace root. If not provided, the interceptor will be created in the current directory.",
|
|
25
25
|
"visible": false
|
|
26
26
|
},
|
|
27
27
|
"project": {
|
|
28
28
|
"type": "string",
|
|
29
|
-
"description": "The name of the project.",
|
|
29
|
+
"description": "The name of the project where the interceptor should be created. If not specified, the CLI will determine the project from the current directory.",
|
|
30
30
|
"$default": {
|
|
31
31
|
"$source": "projectName"
|
|
32
32
|
}
|
|
@@ -34,16 +34,16 @@
|
|
|
34
34
|
"flat": {
|
|
35
35
|
"type": "boolean",
|
|
36
36
|
"default": true,
|
|
37
|
-
"description": "
|
|
37
|
+
"description": "Creates the new interceptor files at the top level of the current project. If set to false, a new folder with the interceptor's name will be created to contain the files."
|
|
38
38
|
},
|
|
39
39
|
"skipTests": {
|
|
40
40
|
"type": "boolean",
|
|
41
|
-
"description": "
|
|
41
|
+
"description": "Skip the generation of a unit test file `spec.ts` for the new interceptor.",
|
|
42
42
|
"default": false
|
|
43
43
|
},
|
|
44
44
|
"functional": {
|
|
45
45
|
"type": "boolean",
|
|
46
|
-
"description": "Creates the interceptor as a `HttpInterceptorFn
|
|
46
|
+
"description": "Creates the interceptor as a function `HttpInterceptorFn` instead of a class. Functional interceptors can be simpler for basic scenarios.",
|
|
47
47
|
"default": true
|
|
48
48
|
}
|
|
49
49
|
},
|
package/interface/schema.d.ts
CHANGED
|
@@ -1,25 +1,33 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Creates a new
|
|
2
|
+
* Creates a new interface in your project. Interfaces define the structure of objects in
|
|
3
|
+
* TypeScript, ensuring type safety and code clarity. This schematic generates a new
|
|
4
|
+
* interface with the specified name and type.
|
|
3
5
|
*/
|
|
4
6
|
export interface Schema {
|
|
5
7
|
/**
|
|
6
|
-
* The name
|
|
8
|
+
* The name for the new interface. This will be used to create the interface file (e.g.,
|
|
9
|
+
* `my-interface.interface.ts`).
|
|
7
10
|
*/
|
|
8
11
|
name: string;
|
|
9
12
|
/**
|
|
10
|
-
* The path
|
|
13
|
+
* The path where the interface file should be created, relative to the workspace root. If
|
|
14
|
+
* not provided, the interface will be created in the current directory.
|
|
11
15
|
*/
|
|
12
16
|
path?: string;
|
|
13
17
|
/**
|
|
14
|
-
* A prefix to
|
|
18
|
+
* A prefix to be added to the interface name. This is typically not used for interfaces, as
|
|
19
|
+
* they don't have selectors like components or directives.
|
|
15
20
|
*/
|
|
16
21
|
prefix?: string;
|
|
17
22
|
/**
|
|
18
|
-
* The name of the project.
|
|
23
|
+
* The name of the project where the interface should be created. If not specified, the CLI
|
|
24
|
+
* will determine the project from the current directory.
|
|
19
25
|
*/
|
|
20
26
|
project: string;
|
|
21
27
|
/**
|
|
22
|
-
* Adds a
|
|
28
|
+
* Adds a custom type to the filename, allowing you to create more descriptive interface
|
|
29
|
+
* names. For example, if you set the type to `data`, the filename will be
|
|
30
|
+
* `my-interface.data.ts`.
|
|
23
31
|
*/
|
|
24
32
|
type?: string;
|
|
25
33
|
}
|
package/interface/schema.json
CHANGED
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
"title": "Angular Interface Options Schema",
|
|
5
5
|
"type": "object",
|
|
6
6
|
"additionalProperties": false,
|
|
7
|
-
"description": "Creates a new,
|
|
7
|
+
"description": "Creates a new interface in your project. Interfaces define the structure of objects in TypeScript, ensuring type safety and code clarity. This schematic generates a new interface with the specified name and type.",
|
|
8
8
|
"properties": {
|
|
9
9
|
"name": {
|
|
10
10
|
"type": "string",
|
|
11
|
-
"description": "The name
|
|
11
|
+
"description": "The name for the new interface. This will be used to create the interface file (e.g., `my-interface.interface.ts`).",
|
|
12
12
|
"$default": {
|
|
13
13
|
"$source": "argv",
|
|
14
14
|
"index": 0
|
|
@@ -21,23 +21,23 @@
|
|
|
21
21
|
"$default": {
|
|
22
22
|
"$source": "workingDirectory"
|
|
23
23
|
},
|
|
24
|
-
"description": "The path
|
|
24
|
+
"description": "The path where the interface file should be created, relative to the workspace root. If not provided, the interface will be created in the current directory.",
|
|
25
25
|
"visible": false
|
|
26
26
|
},
|
|
27
27
|
"project": {
|
|
28
28
|
"type": "string",
|
|
29
|
-
"description": "The name of the project.",
|
|
29
|
+
"description": "The name of the project where the interface should be created. If not specified, the CLI will determine the project from the current directory.",
|
|
30
30
|
"$default": {
|
|
31
31
|
"$source": "projectName"
|
|
32
32
|
}
|
|
33
33
|
},
|
|
34
34
|
"prefix": {
|
|
35
35
|
"type": "string",
|
|
36
|
-
"description": "A prefix to
|
|
36
|
+
"description": "A prefix to be added to the interface name. This is typically not used for interfaces, as they don't have selectors like components or directives."
|
|
37
37
|
},
|
|
38
38
|
"type": {
|
|
39
39
|
"type": "string",
|
|
40
|
-
"description": "Adds a
|
|
40
|
+
"description": "Adds a custom type to the filename, allowing you to create more descriptive interface names. For example, if you set the type to `data`, the filename will be `my-interface.data.ts`.",
|
|
41
41
|
"$default": {
|
|
42
42
|
"$source": "argv",
|
|
43
43
|
"index": 1
|
package/library/index.js
CHANGED
|
@@ -38,8 +38,8 @@ function addDependenciesToPackageJson() {
|
|
|
38
38
|
},
|
|
39
39
|
{
|
|
40
40
|
type: dependencies_1.NodeDependencyType.Dev,
|
|
41
|
-
name: '@angular
|
|
42
|
-
version: latest_versions_1.latestVersions.
|
|
41
|
+
name: '@angular/build',
|
|
42
|
+
version: latest_versions_1.latestVersions.AngularBuild,
|
|
43
43
|
},
|
|
44
44
|
{
|
|
45
45
|
type: dependencies_1.NodeDependencyType.Dev,
|
|
@@ -70,7 +70,7 @@ function addLibToWorkspaceFile(options, projectRoot, projectName) {
|
|
|
70
70
|
prefix: options.prefix,
|
|
71
71
|
targets: {
|
|
72
72
|
build: {
|
|
73
|
-
builder: workspace_models_1.Builders.
|
|
73
|
+
builder: workspace_models_1.Builders.BuildNgPackagr,
|
|
74
74
|
defaultConfiguration: 'production',
|
|
75
75
|
options: {
|
|
76
76
|
project: `${projectRoot}/ng-package.json`,
|
package/library/schema.d.ts
CHANGED
|
@@ -1,38 +1,50 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Creates a new
|
|
2
|
+
* Creates a new library project in your Angular workspace. Libraries are reusable
|
|
3
|
+
* collections of components, services, and other Angular artifacts that can be shared
|
|
4
|
+
* across multiple applications. This schematic simplifies the process of generating a new
|
|
5
|
+
* library with the necessary files and configurations.
|
|
3
6
|
*/
|
|
4
7
|
export interface Schema {
|
|
5
8
|
/**
|
|
6
|
-
* The path
|
|
9
|
+
* The path to the library's public API file, relative to the workspace root. This file
|
|
10
|
+
* defines what parts of the library are accessible to applications that import it.
|
|
7
11
|
*/
|
|
8
12
|
entryFile?: string;
|
|
9
13
|
/**
|
|
10
|
-
* The name
|
|
14
|
+
* The name for the new library. This name will be used for the project directory and
|
|
15
|
+
* various identifiers within the library's code.
|
|
11
16
|
*/
|
|
12
17
|
name: string;
|
|
13
18
|
/**
|
|
14
|
-
* A prefix to
|
|
19
|
+
* A prefix to be added to the selectors of components generated within this library. For
|
|
20
|
+
* example, if the prefix is `my-lib` and you generate a component named `my-component`, the
|
|
21
|
+
* selector will be `my-lib-my-component`.
|
|
15
22
|
*/
|
|
16
23
|
prefix?: string;
|
|
17
24
|
/**
|
|
18
|
-
* The root directory
|
|
25
|
+
* The root directory for the new library, relative to the workspace root. If not specified,
|
|
26
|
+
* the library will be created in a subfolder within the `projects` directory, using the
|
|
27
|
+
* library's name.
|
|
19
28
|
*/
|
|
20
29
|
projectRoot?: string;
|
|
21
30
|
/**
|
|
22
|
-
*
|
|
31
|
+
* Skip the automatic installation of packages. You will need to manually install the
|
|
32
|
+
* dependencies later.
|
|
23
33
|
*/
|
|
24
34
|
skipInstall?: boolean;
|
|
25
35
|
/**
|
|
26
|
-
* Do not add dependencies to the
|
|
36
|
+
* Do not automatically add dependencies to the `package.json` file.
|
|
27
37
|
*/
|
|
28
38
|
skipPackageJson?: boolean;
|
|
29
39
|
/**
|
|
30
|
-
* Do not update
|
|
31
|
-
* is needed to use the library in an
|
|
40
|
+
* Do not update the workspace `tsconfig.json` file to add a path mapping for the new
|
|
41
|
+
* library. The path mapping is needed to use the library in an application, but can be
|
|
42
|
+
* disabled here to simplify development.
|
|
32
43
|
*/
|
|
33
44
|
skipTsConfig?: boolean;
|
|
34
45
|
/**
|
|
35
|
-
*
|
|
46
|
+
* Create a library that utilizes the standalone API, eliminating the need for NgModules.
|
|
47
|
+
* This can simplify the structure of your library and its usage in applications.
|
|
36
48
|
*/
|
|
37
49
|
standalone?: boolean;
|
|
38
50
|
}
|
package/library/schema.json
CHANGED
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
"$id": "SchematicsLibrary",
|
|
4
4
|
"title": "Library Options Schema",
|
|
5
5
|
"type": "object",
|
|
6
|
-
"description": "Creates a new
|
|
6
|
+
"description": "Creates a new library project in your Angular workspace. Libraries are reusable collections of components, services, and other Angular artifacts that can be shared across multiple applications. This schematic simplifies the process of generating a new library with the necessary files and configurations.",
|
|
7
7
|
"additionalProperties": false,
|
|
8
8
|
"properties": {
|
|
9
9
|
"name": {
|
|
10
10
|
"type": "string",
|
|
11
|
-
"description": "The name
|
|
11
|
+
"description": "The name for the new library. This name will be used for the project directory and various identifiers within the library's code.",
|
|
12
12
|
"pattern": "^(?:@[a-zA-Z0-9-*~][a-zA-Z0-9-*._~]*/)?[a-zA-Z0-9-~][a-zA-Z0-9-._~]*$",
|
|
13
13
|
"$default": {
|
|
14
14
|
"$source": "argv",
|
|
@@ -19,37 +19,37 @@
|
|
|
19
19
|
"entryFile": {
|
|
20
20
|
"type": "string",
|
|
21
21
|
"format": "path",
|
|
22
|
-
"description": "The path
|
|
22
|
+
"description": "The path to the library's public API file, relative to the workspace root. This file defines what parts of the library are accessible to applications that import it.",
|
|
23
23
|
"default": "public-api"
|
|
24
24
|
},
|
|
25
25
|
"prefix": {
|
|
26
26
|
"type": "string",
|
|
27
27
|
"format": "html-selector",
|
|
28
|
-
"description": "A prefix to
|
|
28
|
+
"description": "A prefix to be added to the selectors of components generated within this library. For example, if the prefix is `my-lib` and you generate a component named `my-component`, the selector will be `my-lib-my-component`.",
|
|
29
29
|
"default": "lib",
|
|
30
30
|
"alias": "p"
|
|
31
31
|
},
|
|
32
32
|
"skipPackageJson": {
|
|
33
33
|
"type": "boolean",
|
|
34
34
|
"default": false,
|
|
35
|
-
"description": "Do not add dependencies to the
|
|
35
|
+
"description": "Do not automatically add dependencies to the `package.json` file."
|
|
36
36
|
},
|
|
37
37
|
"skipInstall": {
|
|
38
|
-
"description": "
|
|
38
|
+
"description": "Skip the automatic installation of packages. You will need to manually install the dependencies later.",
|
|
39
39
|
"type": "boolean",
|
|
40
40
|
"default": false
|
|
41
41
|
},
|
|
42
42
|
"skipTsConfig": {
|
|
43
43
|
"type": "boolean",
|
|
44
44
|
"default": false,
|
|
45
|
-
"description": "Do not update
|
|
45
|
+
"description": "Do not update the workspace `tsconfig.json` file to add a path mapping for the new library. The path mapping is needed to use the library in an application, but can be disabled here to simplify development."
|
|
46
46
|
},
|
|
47
47
|
"projectRoot": {
|
|
48
48
|
"type": "string",
|
|
49
|
-
"description": "The root directory
|
|
49
|
+
"description": "The root directory for the new library, relative to the workspace root. If not specified, the library will be created in a subfolder within the `projects` directory, using the library's name."
|
|
50
50
|
},
|
|
51
51
|
"standalone": {
|
|
52
|
-
"description": "
|
|
52
|
+
"description": "Create a library that utilizes the standalone API, eliminating the need for NgModules. This can simplify the structure of your library and its usage in applications.",
|
|
53
53
|
"type": "boolean",
|
|
54
54
|
"default": true,
|
|
55
55
|
"x-user-analytics": "ep.ng_standalone"
|
|
@@ -148,6 +148,7 @@ function updateProjects(tree, context) {
|
|
|
148
148
|
case workspace_models_1.Builders.Application:
|
|
149
149
|
case workspace_models_1.Builders.DevServer:
|
|
150
150
|
case workspace_models_1.Builders.ExtractI18n:
|
|
151
|
+
case workspace_models_1.Builders.NgPackagr:
|
|
151
152
|
// Ignore application, dev server, and i18n extraction for devkit usage check.
|
|
152
153
|
// Both will be replaced if no other usage is found.
|
|
153
154
|
continue;
|
|
@@ -170,6 +171,9 @@ function updateProjects(tree, context) {
|
|
|
170
171
|
case workspace_models_1.Builders.ExtractI18n:
|
|
171
172
|
target.builder = '@angular/build:extract-i18n';
|
|
172
173
|
break;
|
|
174
|
+
case workspace_models_1.Builders.NgPackagr:
|
|
175
|
+
target.builder = '@angular/build:ng-packagr';
|
|
176
|
+
break;
|
|
173
177
|
}
|
|
174
178
|
}
|
|
175
179
|
// Add direct @angular/build dependencies and remove @angular-devkit/build-angular
|
package/ng-new/schema.d.ts
CHANGED
|
@@ -1,45 +1,54 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Creates a new
|
|
2
|
+
* Creates a new Angular workspace and an initial project. This schematic sets up the
|
|
3
|
+
* foundation for your Angular development, generating the workspace configuration files and
|
|
4
|
+
* an optional starter application. You can customize various aspects of the workspace and
|
|
5
|
+
* the initial project, such as routing, styling, and testing.
|
|
3
6
|
*/
|
|
4
7
|
export interface Schema {
|
|
5
8
|
/**
|
|
6
|
-
*
|
|
9
|
+
* Configure the initial Git commit for the new repository.
|
|
7
10
|
*/
|
|
8
11
|
commit?: CommitUnion;
|
|
9
12
|
/**
|
|
10
|
-
* Create a new initial application project in the
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
+
* Create a new initial application project in the new workspace. When false, creates an
|
|
14
|
+
* empty workspace with no initial application. You can then use the `ng generate
|
|
15
|
+
* application` command to create applications in the `projects` directory.
|
|
13
16
|
*/
|
|
14
17
|
createApplication?: boolean;
|
|
15
18
|
/**
|
|
16
|
-
* The directory
|
|
19
|
+
* The directory where the new workspace and project should be created. If not specified,
|
|
20
|
+
* the workspace will be created in the current directory.
|
|
17
21
|
*/
|
|
18
22
|
directory?: string;
|
|
19
23
|
/**
|
|
20
|
-
* Create an application that does not utilize zone.js
|
|
24
|
+
* Create an initial application that does not utilize `zone.js`.
|
|
21
25
|
*/
|
|
22
26
|
experimentalZoneless?: boolean;
|
|
23
27
|
/**
|
|
24
|
-
* Include styles
|
|
25
|
-
*
|
|
28
|
+
* Include the styles for the initial application's root component directly within the
|
|
29
|
+
* `app.component.ts` file. By default, a separate stylesheet file (e.g.,
|
|
30
|
+
* `app.component.css`) is created.
|
|
26
31
|
*/
|
|
27
32
|
inlineStyle?: boolean;
|
|
28
33
|
/**
|
|
29
|
-
* Include template
|
|
30
|
-
*
|
|
34
|
+
* Include the HTML template for the initial application's root component directly within
|
|
35
|
+
* the `app.component.ts` file. By default, a separate template file (e.g.,
|
|
36
|
+
* `app.component.html`) is created.
|
|
31
37
|
*/
|
|
32
38
|
inlineTemplate?: boolean;
|
|
33
39
|
/**
|
|
34
|
-
*
|
|
40
|
+
* Generate a minimal Angular workspace without any testing frameworks. This is intended for
|
|
41
|
+
* learning purposes and simple experimentation, not for production applications.
|
|
35
42
|
*/
|
|
36
43
|
minimal?: boolean;
|
|
37
44
|
/**
|
|
38
|
-
* The name
|
|
45
|
+
* The name for the new workspace and the initial project. This name will be used for the
|
|
46
|
+
* root directory and various identifiers throughout the project.
|
|
39
47
|
*/
|
|
40
48
|
name: string;
|
|
41
49
|
/**
|
|
42
|
-
* The path where new projects will be created, relative to the
|
|
50
|
+
* The path where new projects will be created within the workspace, relative to the
|
|
51
|
+
* workspace root. By default, new projects are created in the `projects` directory.
|
|
43
52
|
*/
|
|
44
53
|
newProjectRoot?: string;
|
|
45
54
|
/**
|
|
@@ -47,33 +56,38 @@ export interface Schema {
|
|
|
47
56
|
*/
|
|
48
57
|
packageManager?: PackageManager;
|
|
49
58
|
/**
|
|
50
|
-
* The prefix to apply to generated selectors for the initial project.
|
|
59
|
+
* The prefix to apply to generated selectors for the initial project. For example, if the
|
|
60
|
+
* prefix is `my-app` and you generate a component named `my-component`, the selector will
|
|
61
|
+
* be `my-app-my-component`.
|
|
51
62
|
*/
|
|
52
63
|
prefix?: string;
|
|
53
64
|
/**
|
|
54
|
-
* Enable routing in the initial project.
|
|
65
|
+
* Enable routing in the initial application project. This sets up the necessary files and
|
|
66
|
+
* modules for managing navigation between different views in your application.
|
|
55
67
|
*/
|
|
56
68
|
routing?: boolean;
|
|
57
69
|
/**
|
|
58
|
-
*
|
|
59
|
-
* Preview).
|
|
70
|
+
* Create a server application in the initial project using the Server Routing and App
|
|
71
|
+
* Engine APIs (Developer Preview).
|
|
60
72
|
*/
|
|
61
73
|
serverRouting?: boolean;
|
|
62
74
|
/**
|
|
63
|
-
* Do not initialize a
|
|
75
|
+
* Do not initialize a Git repository in the new workspace. By default, a Git repository is
|
|
76
|
+
* initialized to help you track changes to your project.
|
|
64
77
|
*/
|
|
65
78
|
skipGit?: boolean;
|
|
66
79
|
/**
|
|
67
|
-
*
|
|
80
|
+
* Skip the automatic installation of packages. You will need to manually install the
|
|
81
|
+
* dependencies later.
|
|
68
82
|
*/
|
|
69
83
|
skipInstall?: boolean;
|
|
70
84
|
/**
|
|
71
|
-
*
|
|
85
|
+
* Skip the generation of unit test files `spec.ts`.
|
|
72
86
|
*/
|
|
73
87
|
skipTests?: boolean;
|
|
74
88
|
/**
|
|
75
|
-
*
|
|
76
|
-
* (SSG/Prerendering)
|
|
89
|
+
* Configure the initial application for Server-Side Rendering (SSR) and Static Site
|
|
90
|
+
* Generation (SSG/Prerendering).
|
|
77
91
|
*/
|
|
78
92
|
ssr?: boolean;
|
|
79
93
|
/**
|
|
@@ -81,13 +95,13 @@ export interface Schema {
|
|
|
81
95
|
*/
|
|
82
96
|
standalone?: boolean;
|
|
83
97
|
/**
|
|
84
|
-
*
|
|
85
|
-
*
|
|
86
|
-
*
|
|
98
|
+
* Enable stricter type checking and stricter bundle budgets settings. This setting helps
|
|
99
|
+
* improve maintainability and catch bugs ahead of time. For more information, see
|
|
100
|
+
* https://angular.dev/tools/cli/template-typecheck#strict-mode
|
|
87
101
|
*/
|
|
88
102
|
strict?: boolean;
|
|
89
103
|
/**
|
|
90
|
-
* The
|
|
104
|
+
* The type of stylesheet files to be created for components in the initial project.
|
|
91
105
|
*/
|
|
92
106
|
style?: Style;
|
|
93
107
|
/**
|
|
@@ -95,12 +109,15 @@ export interface Schema {
|
|
|
95
109
|
*/
|
|
96
110
|
version: string;
|
|
97
111
|
/**
|
|
98
|
-
*
|
|
112
|
+
* Sets the view encapsulation mode for components in the initial project. This determines
|
|
113
|
+
* how component styles are scoped and applied. Options include: `Emulated` (default, styles
|
|
114
|
+
* are scoped to the component), `None` (styles are global), and `ShadowDom` (styles are
|
|
115
|
+
* encapsulated using Shadow DOM).
|
|
99
116
|
*/
|
|
100
117
|
viewEncapsulation?: ViewEncapsulation;
|
|
101
118
|
}
|
|
102
119
|
/**
|
|
103
|
-
*
|
|
120
|
+
* Configure the initial Git commit for the new repository.
|
|
104
121
|
*/
|
|
105
122
|
export type CommitUnion = boolean | CommitObject;
|
|
106
123
|
export interface CommitObject {
|
|
@@ -120,7 +137,7 @@ export declare enum PackageManager {
|
|
|
120
137
|
Yarn = "yarn"
|
|
121
138
|
}
|
|
122
139
|
/**
|
|
123
|
-
* The
|
|
140
|
+
* The type of stylesheet files to be created for components in the initial project.
|
|
124
141
|
*/
|
|
125
142
|
export declare enum Style {
|
|
126
143
|
Css = "css",
|
|
@@ -129,7 +146,10 @@ export declare enum Style {
|
|
|
129
146
|
Scss = "scss"
|
|
130
147
|
}
|
|
131
148
|
/**
|
|
132
|
-
*
|
|
149
|
+
* Sets the view encapsulation mode for components in the initial project. This determines
|
|
150
|
+
* how component styles are scoped and applied. Options include: `Emulated` (default, styles
|
|
151
|
+
* are scoped to the component), `None` (styles are global), and `ShadowDom` (styles are
|
|
152
|
+
* encapsulated using Shadow DOM).
|
|
133
153
|
*/
|
|
134
154
|
export declare enum ViewEncapsulation {
|
|
135
155
|
Emulated = "Emulated",
|
package/ng-new/schema.js
CHANGED
|
@@ -15,7 +15,7 @@ var PackageManager;
|
|
|
15
15
|
PackageManager["Yarn"] = "yarn";
|
|
16
16
|
})(PackageManager || (exports.PackageManager = PackageManager = {}));
|
|
17
17
|
/**
|
|
18
|
-
* The
|
|
18
|
+
* The type of stylesheet files to be created for components in the initial project.
|
|
19
19
|
*/
|
|
20
20
|
var Style;
|
|
21
21
|
(function (Style) {
|
|
@@ -25,7 +25,10 @@ var Style;
|
|
|
25
25
|
Style["Scss"] = "scss";
|
|
26
26
|
})(Style || (exports.Style = Style = {}));
|
|
27
27
|
/**
|
|
28
|
-
*
|
|
28
|
+
* Sets the view encapsulation mode for components in the initial project. This determines
|
|
29
|
+
* how component styles are scoped and applied. Options include: `Emulated` (default, styles
|
|
30
|
+
* are scoped to the component), `None` (styles are global), and `ShadowDom` (styles are
|
|
31
|
+
* encapsulated using Shadow DOM).
|
|
29
32
|
*/
|
|
30
33
|
var ViewEncapsulation;
|
|
31
34
|
(function (ViewEncapsulation) {
|