@schematics/angular 20.1.0-next.0 → 20.1.0-next.1

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.
@@ -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
  }
@@ -31,10 +31,10 @@ function addTsProjectReference(...paths) {
31
31
  };
32
32
  }
33
33
  function default_1(options) {
34
- return async (host, context) => {
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, folderName),
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)()
@@ -128,13 +128,20 @@ function addDependenciesToPackageJson(options) {
128
128
  version: latest_versions_1.latestVersions['zone.js'],
129
129
  });
130
130
  }
131
+ if (options.style === schema_1.Style.Less) {
132
+ (0, dependencies_1.addPackageJsonDependency)(host, {
133
+ type: dependencies_1.NodeDependencyType.Dev,
134
+ name: 'less',
135
+ version: latest_versions_1.latestVersions['less'],
136
+ });
137
+ }
131
138
  if (!options.skipInstall) {
132
139
  context.addTask(new tasks_1.NodePackageInstallTask());
133
140
  }
134
141
  return host;
135
142
  };
136
143
  }
137
- function addAppToWorkspaceFile(options, appDir, folderName) {
144
+ function addAppToWorkspaceFile(options, appDir) {
138
145
  let projectRoot = appDir;
139
146
  if (projectRoot) {
140
147
  projectRoot += '/';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@schematics/angular",
3
- "version": "20.1.0-next.0",
3
+ "version": "20.1.0-next.1",
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.0",
26
- "@angular-devkit/schematics": "20.1.0-next.0",
25
+ "@angular-devkit/core": "20.1.0-next.1",
26
+ "@angular-devkit/schematics": "20.1.0-next.1",
27
27
  "jsonc-parser": "3.3.1"
28
28
  },
29
29
  "repository": {
@@ -8,7 +8,7 @@
8
8
  "@types/node": "^20.17.19",
9
9
  "browser-sync": "^3.0.0",
10
10
  "express": "^5.1.0",
11
- "jasmine-core": "~5.7.0",
11
+ "jasmine-core": "~5.8.0",
12
12
  "jasmine-spec-reporter": "~7.0.0",
13
13
  "karma-chrome-launcher": "~3.2.0",
14
14
  "karma-coverage": "~2.2.0",
@@ -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.0',
20
- AngularBuild: '^20.1.0-next.0',
21
- AngularSSR: '^20.1.0-next.0',
19
+ DevkitBuildAngular: '^20.1.0-next.1',
20
+ AngularBuild: '^20.1.0-next.1',
21
+ AngularSSR: '^20.1.0-next.1',
22
22
  };