@schematics/angular 12.1.0-next.6 → 12.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.
@@ -380,6 +380,13 @@
380
380
  <svg class="material-icons" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"/></svg>
381
381
  </a>
382
382
 
383
+ <a class="card" target="_blank" rel="noopener" href="https://angular.io/devtools/">
384
+ <svg class="material-icons" xmlns="http://www.w3.org/2000/svg" enable-background="new 0 0 24 24" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><g><rect fill="none" height="24" width="24"/></g><g><g><path d="M14.73,13.31C15.52,12.24,16,10.93,16,9.5C16,5.91,13.09,3,9.5,3S3,5.91,3,9.5C3,13.09,5.91,16,9.5,16 c1.43,0,2.74-0.48,3.81-1.27L19.59,21L21,19.59L14.73,13.31z M9.5,14C7.01,14,5,11.99,5,9.5S7.01,5,9.5,5S14,7.01,14,9.5 S11.99,14,9.5,14z"/><polygon points="10.29,8.44 9.5,6 8.71,8.44 6.25,8.44 8.26,10.03 7.49,12.5 9.5,10.97 11.51,12.5 10.74,10.03 12.75,8.44"/></g></g></svg>
385
+ <span>Angular DevTools</span>
386
+
387
+ <svg class="material-icons" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"/></svg>
388
+ </a>
389
+
383
390
  </div>
384
391
 
385
392
  <!-- Next Steps -->
@@ -14,7 +14,7 @@ import { Component, OnInit<% if(!!viewEncapsulation) { %>, ViewEncapsulation<% }
14
14
  display: block;
15
15
  }
16
16
  `<% } %>
17
- ]<% } else { %>
17
+ ]<% } else if (style !== 'none') { %>
18
18
  styleUrls: ['./<%= dasherize(name) %><%= type ? '.' + dasherize(type): '' %>.<%= style %>']<% } %><% if(!!viewEncapsulation) { %>,
19
19
  encapsulation: ViewEncapsulation.<%= viewEncapsulation %><% } if (changeDetection !== 'Default') { %>,
20
20
  changeDetection: ChangeDetectionStrategy.<%= changeDetection %><% } %>
@@ -36,6 +36,7 @@ const lint_fix_1 = require("../utility/lint-fix");
36
36
  const parse_name_1 = require("../utility/parse-name");
37
37
  const validation_1 = require("../utility/validation");
38
38
  const workspace_1 = require("../utility/workspace");
39
+ const schema_1 = require("./schema");
39
40
  function readIntoSourceFile(host, modulePath) {
40
41
  const text = host.read(modulePath);
41
42
  if (text === null) {
@@ -110,9 +111,10 @@ function default_1(options) {
110
111
  options.selector || buildSelector(options, (project && project.prefix) || '');
111
112
  validation_1.validateName(options.name);
112
113
  validation_1.validateHtmlSelector(options.selector);
114
+ const skipStyleFile = options.inlineStyle || options.style === schema_1.Style.None;
113
115
  const templateSource = schematics_1.apply(schematics_1.url('./files'), [
114
116
  options.skipTests ? schematics_1.filter((path) => !path.endsWith('.spec.ts.template')) : schematics_1.noop(),
115
- options.inlineStyle ? schematics_1.filter((path) => !path.endsWith('.__style__.template')) : schematics_1.noop(),
117
+ skipStyleFile ? schematics_1.filter((path) => !path.endsWith('.__style__.template')) : schematics_1.noop(),
116
118
  options.inlineTemplate ? schematics_1.filter((path) => !path.endsWith('.html.template')) : schematics_1.noop(),
117
119
  schematics_1.applyTemplates({
118
120
  ...core_1.strings,
@@ -71,7 +71,8 @@ export interface Schema {
71
71
  */
72
72
  skipTests?: boolean;
73
73
  /**
74
- * The file extension or preprocessor to use for style files.
74
+ * The file extension or preprocessor to use for style files, or 'none' to skip generating
75
+ * the style file.
75
76
  */
76
77
  style?: Style;
77
78
  /**
@@ -91,11 +92,13 @@ export declare enum ChangeDetection {
91
92
  OnPush = "OnPush"
92
93
  }
93
94
  /**
94
- * The file extension or preprocessor to use for style files.
95
+ * The file extension or preprocessor to use for style files, or 'none' to skip generating
96
+ * the style file.
95
97
  */
96
98
  export declare enum Style {
97
99
  Css = "css",
98
100
  Less = "less",
101
+ None = "none",
99
102
  Sass = "sass",
100
103
  Scss = "scss"
101
104
  }
@@ -12,12 +12,14 @@ var ChangeDetection;
12
12
  ChangeDetection["OnPush"] = "OnPush";
13
13
  })(ChangeDetection = exports.ChangeDetection || (exports.ChangeDetection = {}));
14
14
  /**
15
- * The file extension or preprocessor to use for style files.
15
+ * The file extension or preprocessor to use for style files, or 'none' to skip generating
16
+ * the style file.
16
17
  */
17
18
  var Style;
18
19
  (function (Style) {
19
20
  Style["Css"] = "css";
20
21
  Style["Less"] = "less";
22
+ Style["None"] = "none";
21
23
  Style["Sass"] = "sass";
22
24
  Style["Scss"] = "scss";
23
25
  })(Style = exports.Style || (exports.Style = {}));
@@ -77,10 +77,10 @@
77
77
  ]
78
78
  },
79
79
  "style": {
80
- "description": "The file extension or preprocessor to use for style files.",
80
+ "description": "The file extension or preprocessor to use for style files, or 'none' to skip generating the style file.",
81
81
  "type": "string",
82
82
  "default": "css",
83
- "enum": ["css", "scss", "sass", "less"],
83
+ "enum": ["css", "scss", "sass", "less", "none"],
84
84
  "x-user-analytics": 5
85
85
  },
86
86
  "type": {
@@ -7,6 +7,7 @@
7
7
  * found in the LICENSE file at https://angular.io/license
8
8
  */
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
+ const core_1 = require("@angular-devkit/core");
10
11
  const workspace_1 = require("../../utility/workspace");
11
12
  const BrowserBuilderOptions = [
12
13
  ['aot', false, true],
@@ -22,9 +23,15 @@ const ServerBuilderOptions = [
22
23
  ['optimization', false, true],
23
24
  ];
24
25
  function default_1() {
25
- return workspace_1.updateWorkspace((workspace) => {
26
- for (const [, target] of workspace_1.allWorkspaceTargets(workspace)) {
27
- if (!(target === null || target === void 0 ? void 0 : target.builder.startsWith('@angular-devkit/build-angular'))) {
26
+ return (_tree, context) => workspace_1.updateWorkspace((workspace) => {
27
+ for (const [targetName, target, projectName] of workspace_1.allWorkspaceTargets(workspace)) {
28
+ if (!target.builder.startsWith('@angular-devkit/') &&
29
+ !target.builder.startsWith('@nguniversal/')) {
30
+ context.logger.warn(core_1.tags.stripIndent `
31
+ "${targetName}" target in "${projectName}" project is using a third-party builder.
32
+ You may need to adjust the options to retain the existing behavior.
33
+ For more information, see the breaking changes section within the release notes: https://github.com/angular/angular-cli/releases/tag/v12.0.0
34
+ `);
28
35
  continue;
29
36
  }
30
37
  // Only interested in Angular Devkit browser and server builders
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@schematics/angular",
3
- "version": "12.1.0-next.6",
3
+ "version": "12.1.0",
4
4
  "description": "Schematics specific to Angular",
5
5
  "homepage": "https://github.com/angular/angular-cli",
6
6
  "keywords": [
@@ -15,8 +15,8 @@
15
15
  ],
16
16
  "schematics": "./collection.json",
17
17
  "dependencies": {
18
- "@angular-devkit/core": "12.1.0-next.6",
19
- "@angular-devkit/schematics": "12.1.0-next.6",
18
+ "@angular-devkit/core": "12.1.0",
19
+ "@angular-devkit/schematics": "12.1.0",
20
20
  "jsonc-parser": "3.0.0"
21
21
  },
22
22
  "repository": {
@@ -10,7 +10,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
10
10
  exports.latestVersions = void 0;
11
11
  exports.latestVersions = {
12
12
  // These versions should be kept up to date with latest Angular peer dependencies.
13
- Angular: '~12.1.0-next.6',
13
+ Angular: '~12.1.0',
14
14
  RxJs: '~6.6.0',
15
15
  ZoneJs: '~0.11.4',
16
16
  TypeScript: '~4.3.2',
@@ -19,5 +19,5 @@ exports.latestVersions = {
19
19
  // published together from the same monorepo, and they are both
20
20
  // non-experimental, they will always have the same version.
21
21
  DevkitBuildAngular: '~' + require('../package.json')['version'],
22
- ngPackagr: '^12.0.0-next.8',
22
+ ngPackagr: '^12.1.0-next.0',
23
23
  };