@schematics/angular 14.1.0-next.4 → 14.1.0-rc.3
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/app-shell/schema.json +0 -1
- package/e2e/schema.json +0 -1
- package/library/schema.json +0 -1
- package/package.json +3 -3
- package/utility/dependency.js +11 -8
- package/app-shell/app-shell-long.md +0 -47
- package/e2e/e2e-long.md +0 -2
- package/library/files/.browserslistrc.template +0 -16
- package/library/library-long.md +0 -5
package/app-shell/schema.json
CHANGED
package/e2e/schema.json
CHANGED
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
"type": "object",
|
|
6
6
|
"additionalProperties": false,
|
|
7
7
|
"description": "Generates a new, generic end-to-end test definition for the given or default project.",
|
|
8
|
-
"long-description": "e2e-long.md",
|
|
9
8
|
"properties": {
|
|
10
9
|
"rootSelector": {
|
|
11
10
|
"description": "The HTML selector for the root component of the test app.",
|
package/library/schema.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@schematics/angular",
|
|
3
|
-
"version": "14.1.0-
|
|
3
|
+
"version": "14.1.0-rc.3",
|
|
4
4
|
"description": "Schematics specific to Angular",
|
|
5
5
|
"homepage": "https://github.com/angular/angular-cli",
|
|
6
6
|
"keywords": [
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
},
|
|
24
24
|
"schematics": "./collection.json",
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@angular-devkit/core": "14.1.0-
|
|
27
|
-
"@angular-devkit/schematics": "14.1.0-
|
|
26
|
+
"@angular-devkit/core": "14.1.0-rc.3",
|
|
27
|
+
"@angular-devkit/schematics": "14.1.0-rc.3",
|
|
28
28
|
"jsonc-parser": "3.0.0"
|
|
29
29
|
},
|
|
30
30
|
"repository": {
|
package/utility/dependency.js
CHANGED
|
@@ -94,15 +94,18 @@ function addDependency(name, specifier, options = {}) {
|
|
|
94
94
|
// Section is not present. The dependency can be added to a new object literal for the section.
|
|
95
95
|
manifest[type] = { [name]: specifier };
|
|
96
96
|
}
|
|
97
|
-
else if (dependencySection[name] === specifier) {
|
|
98
|
-
// Already present with same specifier
|
|
99
|
-
return;
|
|
100
|
-
}
|
|
101
|
-
else if (dependencySection[name]) {
|
|
102
|
-
// Already present but different specifier
|
|
103
|
-
throw new Error(`Package dependency "${name}" already exists with a different specifier.`);
|
|
104
|
-
}
|
|
105
97
|
else {
|
|
98
|
+
const existingSpecifier = dependencySection[name];
|
|
99
|
+
if (existingSpecifier === specifier) {
|
|
100
|
+
// Already present with same specifier
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
if (existingSpecifier) {
|
|
104
|
+
// Already present but different specifier
|
|
105
|
+
// This warning may become an error in the future
|
|
106
|
+
context.logger.warn(`Package dependency "${name}" already exists with a different specifier. ` +
|
|
107
|
+
`"${existingSpecifier}" will be replaced with "${specifier}".`);
|
|
108
|
+
}
|
|
106
109
|
// Add new dependency in alphabetical order
|
|
107
110
|
const entries = Object.entries(dependencySection);
|
|
108
111
|
entries.push([name, specifier]);
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
An app shell lets Universal render a portion of your application via a route at build time.
|
|
2
|
-
This gives users a meaningful first paint of your application that appears quickly
|
|
3
|
-
because the browser can simply render the HTML without the need to initialize any JavaScript.
|
|
4
|
-
|
|
5
|
-
Use this command with a routing app that is accompanied by a Universal server-side app.
|
|
6
|
-
|
|
7
|
-
To create an app shell, use the following command.
|
|
8
|
-
|
|
9
|
-
<code-example format="." language="bash">
|
|
10
|
-
ng generate app-shell my-app
|
|
11
|
-
</code-example>
|
|
12
|
-
|
|
13
|
-
- `my-app` is the name of your client application
|
|
14
|
-
- `server-app` is the name of the Universal (server) application
|
|
15
|
-
|
|
16
|
-
The command adds two new architect build targets to your `angular.json` configuration file (along with a few other changes).
|
|
17
|
-
|
|
18
|
-
<code-example format="." language="none" linenums="false">
|
|
19
|
-
"server": {
|
|
20
|
-
"builder": "@angular-devkit/build-angular:server",
|
|
21
|
-
"options": {
|
|
22
|
-
"outputPath": "dist/my-app-server",
|
|
23
|
-
"main": "src/main.server.ts",
|
|
24
|
-
"tsConfig": "src/tsconfig.server.json"
|
|
25
|
-
}
|
|
26
|
-
},
|
|
27
|
-
"app-shell": {
|
|
28
|
-
"builder": "@angular-devkit/build-angular:app-shell",
|
|
29
|
-
"options": {
|
|
30
|
-
"browserTarget": "my-app:build",
|
|
31
|
-
"serverTarget": "my-app:server",
|
|
32
|
-
"route": "shell"
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
</code-example>
|
|
36
|
-
|
|
37
|
-
To verify the that the app has been built with the default shell content:
|
|
38
|
-
|
|
39
|
-
1. Run the app-shell target.
|
|
40
|
-
|
|
41
|
-
<code-example format="." language="bash">
|
|
42
|
-
ng run my-app:app-shell
|
|
43
|
-
</code-example>
|
|
44
|
-
|
|
45
|
-
1. Open `dist/app-shell/index.html` in your browser.
|
|
46
|
-
|
|
47
|
-
The default text "app-shell works!" verifies that the app-shell route was rendered as part of the output.
|
package/e2e/e2e-long.md
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
|
|
2
|
-
# For additional information regarding the format and rule options, please see:
|
|
3
|
-
# https://github.com/browserslist/browserslist#queries
|
|
4
|
-
|
|
5
|
-
# For the full list of supported browsers by the Angular framework, please see:
|
|
6
|
-
# https://angular.io/guide/browser-support
|
|
7
|
-
|
|
8
|
-
# You can see what browsers were selected by your queries by running:
|
|
9
|
-
# npx browserslist
|
|
10
|
-
|
|
11
|
-
last 1 Chrome version
|
|
12
|
-
last 1 Firefox version
|
|
13
|
-
last 2 Edge major versions
|
|
14
|
-
last 2 Safari major versions
|
|
15
|
-
last 2 iOS major versions
|
|
16
|
-
Firefox ESR
|
package/library/library-long.md
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
A library is a type of project that does not run independently.
|
|
2
|
-
The library skeleton created by this command is placed by default in the `/projects` folder, and has `type` of "library".
|
|
3
|
-
|
|
4
|
-
You can build a new library using the `ng build` command, run unit tests for it using the `ng test` command,
|
|
5
|
-
and lint it using the `ng lint` command.
|