@schematics/angular 20.1.0-next.0 → 20.1.0-next.2
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/application/files/common-files/src/app/app.html.template +1 -1
- package/application/files/module-files/src/app/app.ts.template +3 -3
- package/application/files/standalone-files/src/app/app.ts.template +3 -3
- package/application/index.js +11 -3
- package/package.json +3 -3
- package/server/index.js +8 -0
- package/utility/latest-versions/package.json +1 -1
- package/utility/latest-versions.js +3 -3
|
@@ -225,7 +225,7 @@
|
|
|
225
225
|
<clipPath id="a"><path fill="#fff" d="M0 0h982v239H0z" /></clipPath>
|
|
226
226
|
</defs>
|
|
227
227
|
</svg>
|
|
228
|
-
<h1>Hello, {{ title }}</h1>
|
|
228
|
+
<h1>Hello, {{ title() }}</h1>
|
|
229
229
|
<p>Congratulations! Your app is running. 🎉</p>
|
|
230
230
|
</div>
|
|
231
231
|
<div class="divider" role="separator" aria-label="Divider"></div>
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Component } from '@angular/core';
|
|
1
|
+
import { Component, signal } from '@angular/core';
|
|
2
2
|
|
|
3
3
|
@Component({
|
|
4
4
|
selector: '<%= selector %>',<% if(inlineTemplate) { %>
|
|
5
5
|
template: `
|
|
6
|
-
<h1>Welcome to {{title}}!</h1>
|
|
6
|
+
<h1>Welcome to {{ title() }}!</h1>
|
|
7
7
|
|
|
8
8
|
<% if (routing) {
|
|
9
9
|
%><router-outlet /><%
|
|
@@ -15,5 +15,5 @@ import { Component } from '@angular/core';
|
|
|
15
15
|
styleUrl: './app.<%= style %>'<% } %>
|
|
16
16
|
})
|
|
17
17
|
export class App {
|
|
18
|
-
protected title = '<%= name %>';
|
|
18
|
+
protected readonly title = signal('<%= name %>');
|
|
19
19
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { Component } from '@angular/core';<% if(routing) { %>
|
|
1
|
+
import { Component, signal } from '@angular/core';<% if(routing) { %>
|
|
2
2
|
import { RouterOutlet } from '@angular/router';<% } %>
|
|
3
3
|
|
|
4
4
|
@Component({
|
|
5
5
|
selector: '<%= selector %>',
|
|
6
6
|
imports: [<% if(routing) { %>RouterOutlet<% } %>],<% if(inlineTemplate) { %>
|
|
7
7
|
template: `
|
|
8
|
-
<h1>Welcome to {{title}}!</h1>
|
|
8
|
+
<h1>Welcome to {{ title() }}!</h1>
|
|
9
9
|
|
|
10
10
|
<% if (routing) {
|
|
11
11
|
%><router-outlet /><%
|
|
@@ -16,5 +16,5 @@ import { RouterOutlet } from '@angular/router';<% } %>
|
|
|
16
16
|
styleUrl: './app.<%= style %>'<% } %>
|
|
17
17
|
})
|
|
18
18
|
export class App {
|
|
19
|
-
protected title = '<%= name %>';
|
|
19
|
+
protected readonly title = signal('<%= name %>');
|
|
20
20
|
}
|
package/application/index.js
CHANGED
|
@@ -31,10 +31,10 @@ function addTsProjectReference(...paths) {
|
|
|
31
31
|
};
|
|
32
32
|
}
|
|
33
33
|
function default_1(options) {
|
|
34
|
-
return async (host
|
|
34
|
+
return async (host) => {
|
|
35
35
|
const { appDir, appRootSelector, componentOptions, folderName, sourceDir } = await getAppOptions(host, options);
|
|
36
36
|
return (0, schematics_1.chain)([
|
|
37
|
-
addAppToWorkspaceFile(options, appDir
|
|
37
|
+
addAppToWorkspaceFile(options, appDir),
|
|
38
38
|
addTsProjectReference('./' + (0, core_1.join)((0, core_1.normalize)(appDir), 'tsconfig.app.json')),
|
|
39
39
|
options.skipTests || options.minimal
|
|
40
40
|
? (0, schematics_1.noop)()
|
|
@@ -49,6 +49,7 @@ function default_1(options) {
|
|
|
49
49
|
routingScope: 'Root',
|
|
50
50
|
path: sourceDir,
|
|
51
51
|
project: options.name,
|
|
52
|
+
typeSeparator: undefined,
|
|
52
53
|
}),
|
|
53
54
|
(0, schematics_1.schematic)('component', {
|
|
54
55
|
name: 'app',
|
|
@@ -128,13 +129,20 @@ function addDependenciesToPackageJson(options) {
|
|
|
128
129
|
version: latest_versions_1.latestVersions['zone.js'],
|
|
129
130
|
});
|
|
130
131
|
}
|
|
132
|
+
if (options.style === schema_1.Style.Less) {
|
|
133
|
+
(0, dependencies_1.addPackageJsonDependency)(host, {
|
|
134
|
+
type: dependencies_1.NodeDependencyType.Dev,
|
|
135
|
+
name: 'less',
|
|
136
|
+
version: latest_versions_1.latestVersions['less'],
|
|
137
|
+
});
|
|
138
|
+
}
|
|
131
139
|
if (!options.skipInstall) {
|
|
132
140
|
context.addTask(new tasks_1.NodePackageInstallTask());
|
|
133
141
|
}
|
|
134
142
|
return host;
|
|
135
143
|
};
|
|
136
144
|
}
|
|
137
|
-
function addAppToWorkspaceFile(options, appDir
|
|
145
|
+
function addAppToWorkspaceFile(options, appDir) {
|
|
138
146
|
let projectRoot = appDir;
|
|
139
147
|
if (projectRoot) {
|
|
140
148
|
projectRoot += '/';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@schematics/angular",
|
|
3
|
-
"version": "20.1.0-next.
|
|
3
|
+
"version": "20.1.0-next.2",
|
|
4
4
|
"description": "Schematics specific to Angular",
|
|
5
5
|
"homepage": "https://github.com/angular/angular-cli",
|
|
6
6
|
"keywords": [
|
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
},
|
|
23
23
|
"schematics": "./collection.json",
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@angular-devkit/core": "20.1.0-next.
|
|
26
|
-
"@angular-devkit/schematics": "20.1.0-next.
|
|
25
|
+
"@angular-devkit/core": "20.1.0-next.2",
|
|
26
|
+
"@angular-devkit/schematics": "20.1.0-next.2",
|
|
27
27
|
"jsonc-parser": "3.3.1"
|
|
28
28
|
},
|
|
29
29
|
"repository": {
|
package/server/index.js
CHANGED
|
@@ -95,6 +95,14 @@ function updateConfigFileApplicationBuilder(options) {
|
|
|
95
95
|
function updateTsConfigFile(tsConfigPath) {
|
|
96
96
|
return (host) => {
|
|
97
97
|
const json = new json_file_1.JSONFile(host, tsConfigPath);
|
|
98
|
+
// Skip adding the files entry if the server entry would already be included.
|
|
99
|
+
const include = json.get(['include']);
|
|
100
|
+
if (!Array.isArray(include) || !include.includes('src/**/*.ts')) {
|
|
101
|
+
const filesPath = ['files'];
|
|
102
|
+
const files = new Set(json.get(filesPath) ?? []);
|
|
103
|
+
files.add('src/' + serverMainEntryName);
|
|
104
|
+
json.modify(filesPath, [...files]);
|
|
105
|
+
}
|
|
98
106
|
const typePath = ['compilerOptions', 'types'];
|
|
99
107
|
const types = new Set(json.get(typePath) ?? []);
|
|
100
108
|
types.add('node');
|
|
@@ -16,7 +16,7 @@ exports.latestVersions = {
|
|
|
16
16
|
// As Angular CLI works with same minor versions of Angular Framework, a tilde match for the current
|
|
17
17
|
Angular: '^20.1.0-next.0',
|
|
18
18
|
NgPackagr: '^20.1.0-next.0',
|
|
19
|
-
DevkitBuildAngular: '^20.1.0-next.
|
|
20
|
-
AngularBuild: '^20.1.0-next.
|
|
21
|
-
AngularSSR: '^20.1.0-next.
|
|
19
|
+
DevkitBuildAngular: '^20.1.0-next.2',
|
|
20
|
+
AngularBuild: '^20.1.0-next.2',
|
|
21
|
+
AngularSSR: '^20.1.0-next.2',
|
|
22
22
|
};
|