@nx/angular 16.5.0-beta.2 → 16.5.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/angular",
|
|
3
|
-
"version": "16.5.0
|
|
3
|
+
"version": "16.5.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "The Nx Plugin for Angular contains executors, generators, and utilities for managing Angular applications and libraries within an Nx workspace. It provides: \n\n- Integration with libraries such as Storybook, Jest, ESLint, Tailwind CSS, and Cypress. \n\n- Generators to help scaffold code quickly (like: Micro Frontends, Libraries, both internal to your codebase and publishable to npm) \n\n- Upgrading AngularJS applications \n\n- Single Component Application Modules (SCAMs) \n\n- NgRx helpers. \n\n- Utilities for automatic workspace refactoring.",
|
|
6
6
|
"repository": {
|
|
@@ -66,14 +66,14 @@
|
|
|
66
66
|
"migrations": "./migrations.json"
|
|
67
67
|
},
|
|
68
68
|
"dependencies": {
|
|
69
|
-
"@nrwl/angular": "16.5.0
|
|
70
|
-
"@nx/cypress": "16.5.0
|
|
71
|
-
"@nx/devkit": "16.5.0
|
|
72
|
-
"@nx/jest": "16.5.0
|
|
73
|
-
"@nx/js": "16.5.0
|
|
74
|
-
"@nx/linter": "16.5.0
|
|
75
|
-
"@nx/webpack": "16.5.0
|
|
76
|
-
"@nx/workspace": "16.5.0
|
|
69
|
+
"@nrwl/angular": "16.5.0",
|
|
70
|
+
"@nx/cypress": "16.5.0",
|
|
71
|
+
"@nx/devkit": "16.5.0",
|
|
72
|
+
"@nx/jest": "16.5.0",
|
|
73
|
+
"@nx/js": "16.5.0",
|
|
74
|
+
"@nx/linter": "16.5.0",
|
|
75
|
+
"@nx/webpack": "16.5.0",
|
|
76
|
+
"@nx/workspace": "16.5.0",
|
|
77
77
|
"@phenomnomnominal/tsquery": "~5.0.1",
|
|
78
78
|
"@typescript-eslint/type-utils": "^5.36.1",
|
|
79
79
|
"chalk": "^4.1.0",
|
|
@@ -109,5 +109,5 @@
|
|
|
109
109
|
"module": "fesm2022/nx-angular.mjs",
|
|
110
110
|
"typings": "index.d.ts",
|
|
111
111
|
"sideEffects": false,
|
|
112
|
-
"gitHead": "
|
|
112
|
+
"gitHead": "eaebcc34f92db2200dab0bde2e2e1dde107a47bf"
|
|
113
113
|
}
|
|
@@ -5,6 +5,9 @@ const devkit_1 = require("@nx/devkit");
|
|
|
5
5
|
const version_utils_1 = require("../../utils/version-utils");
|
|
6
6
|
function createProject(tree, options) {
|
|
7
7
|
const installedAngularInfo = (0, version_utils_1.getInstalledAngularVersionInfo)(tree);
|
|
8
|
+
const buildExecutor = options.bundler === 'webpack'
|
|
9
|
+
? '@angular-devkit/build-angular:browser'
|
|
10
|
+
: '@angular-devkit/build-angular:browser-esbuild';
|
|
8
11
|
const project = {
|
|
9
12
|
name: options.name,
|
|
10
13
|
projectType: 'application',
|
|
@@ -14,7 +17,7 @@ function createProject(tree, options) {
|
|
|
14
17
|
tags: options.parsedTags,
|
|
15
18
|
targets: {
|
|
16
19
|
build: {
|
|
17
|
-
executor:
|
|
20
|
+
executor: buildExecutor,
|
|
18
21
|
outputs: ['{options.outputPath}'],
|
|
19
22
|
options: {
|
|
20
23
|
outputPath: `dist/${!options.rootProject ? options.appProjectRoot : options.name}`,
|
|
@@ -33,18 +36,20 @@ function createProject(tree, options) {
|
|
|
33
36
|
},
|
|
34
37
|
configurations: {
|
|
35
38
|
production: {
|
|
36
|
-
budgets:
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
39
|
+
budgets: options.bundler === 'webpack'
|
|
40
|
+
? [
|
|
41
|
+
{
|
|
42
|
+
type: 'initial',
|
|
43
|
+
maximumWarning: '500kb',
|
|
44
|
+
maximumError: '1mb',
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
type: 'anyComponentStyle',
|
|
48
|
+
maximumWarning: '2kb',
|
|
49
|
+
maximumError: '4kb',
|
|
50
|
+
},
|
|
51
|
+
]
|
|
52
|
+
: undefined,
|
|
48
53
|
fileReplacements: installedAngularInfo.major === 14
|
|
49
54
|
? [
|
|
50
55
|
{
|
|
@@ -58,10 +63,10 @@ function createProject(tree, options) {
|
|
|
58
63
|
development: {
|
|
59
64
|
buildOptimizer: false,
|
|
60
65
|
optimization: false,
|
|
61
|
-
vendorChunk: true,
|
|
66
|
+
vendorChunk: options.bundler === 'webpack' ? true : undefined,
|
|
62
67
|
extractLicenses: false,
|
|
63
68
|
sourceMap: true,
|
|
64
|
-
namedChunks: true,
|
|
69
|
+
namedChunks: options.bundler === 'webpack' ? true : undefined,
|
|
65
70
|
},
|
|
66
71
|
},
|
|
67
72
|
defaultConfiguration: 'production',
|
|
@@ -7,7 +7,7 @@ const test_runners_1 = require("../../../utils/test-runners");
|
|
|
7
7
|
const linter_1 = require("@nx/linter");
|
|
8
8
|
const project_1 = require("../../utils/project");
|
|
9
9
|
function normalizeOptions(host, options) {
|
|
10
|
-
var _a;
|
|
10
|
+
var _a, _b;
|
|
11
11
|
const { layoutDirectory, projectDirectory } = (0, devkit_1.extractLayoutDirectory)(options.directory);
|
|
12
12
|
const appDirectory = (0, project_1.normalizeDirectory)(options.name, projectDirectory);
|
|
13
13
|
const appProjectName = (0, project_1.normalizeProjectName)(options.name, projectDirectory);
|
|
@@ -30,7 +30,7 @@ function normalizeOptions(host, options) {
|
|
|
30
30
|
const ngCliSchematicAppRoot = appProjectName;
|
|
31
31
|
const ngCliSchematicE2ERoot = `${appProjectName}/e2e`;
|
|
32
32
|
// Set defaults and then overwrite with user options
|
|
33
|
-
return Object.assign(Object.assign({ style: 'css', routing: false, inlineStyle: false, inlineTemplate: false, skipTests: options.unitTestRunner === test_runners_1.UnitTestRunner.None, skipFormat: false, unitTestRunner: test_runners_1.UnitTestRunner.Jest, e2eTestRunner: test_runners_1.E2eTestRunner.Cypress, linter: linter_1.Linter.EsLint, strict: true }, options), { prefix, name: appProjectName, appProjectRoot,
|
|
33
|
+
return Object.assign(Object.assign({ style: 'css', routing: false, inlineStyle: false, inlineTemplate: false, skipTests: options.unitTestRunner === test_runners_1.UnitTestRunner.None, skipFormat: false, unitTestRunner: test_runners_1.UnitTestRunner.Jest, e2eTestRunner: test_runners_1.E2eTestRunner.Cypress, linter: linter_1.Linter.EsLint, strict: true, bundler: (_b = options.bundler) !== null && _b !== void 0 ? _b : 'webpack' }, options), { prefix, name: appProjectName, appProjectRoot,
|
|
34
34
|
e2eProjectRoot,
|
|
35
35
|
e2eProjectName,
|
|
36
36
|
parsedTags,
|
|
@@ -164,6 +164,12 @@
|
|
|
164
164
|
"description": "Generate a Angular app with a minimal setup.",
|
|
165
165
|
"type": "boolean",
|
|
166
166
|
"default": false
|
|
167
|
+
},
|
|
168
|
+
"bundler": {
|
|
169
|
+
"description": "Bundler to use to build the application.",
|
|
170
|
+
"type": "string",
|
|
171
|
+
"enum": ["webpack", "esbuild"],
|
|
172
|
+
"default": "webpack"
|
|
167
173
|
}
|
|
168
174
|
},
|
|
169
175
|
"additionalProperties": false,
|