@nx/angular 18.0.0-beta.0 → 18.0.0-beta.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/executors.d.ts +1 -1
- package/generators.d.ts +1 -1
- package/generators.js +3 -1
- package/generators.json +7 -2
- package/migrations.json +6 -0
- package/package.json +11 -11
- package/plugins/component-testing.d.ts +1 -26
- package/plugins/component-testing.js +11 -1
- package/src/builders/dev-server/dev-server.impl.js +1 -1
- package/src/builders/dev-server/schema.json +1 -1
- package/src/executors/module-federation-dev-server/schema.json +1 -1
- package/src/executors/ng-packagr-lite/schema.json +1 -1
- package/src/executors/package/schema.json +1 -1
- package/src/generators/add-linting/add-linting.js +1 -0
- package/src/generators/add-linting/schema.d.ts +1 -0
- package/src/generators/add-linting/schema.json +1 -1
- package/src/generators/application/application.js +3 -0
- package/src/generators/application/files/ng-module/src/app/nx-welcome.component.ts__tpl__ +19 -0
- package/src/generators/application/files/standalone-components/src/app/nx-welcome.component.ts__tpl__ +19 -0
- package/src/generators/application/lib/add-e2e.js +2 -0
- package/src/generators/application/lib/add-linting.js +1 -0
- package/src/generators/application/lib/add-unit-test-runner.js +1 -0
- package/src/generators/application/lib/normalize-options.js +1 -0
- package/src/generators/application/schema.d.ts +1 -0
- package/src/generators/application/schema.json +4 -4
- package/src/generators/component/schema.d.ts +3 -3
- package/src/generators/component/schema.json +2 -2
- package/src/generators/component-cypress-spec/schema.json +1 -1
- package/src/generators/component-test/schema.json +1 -1
- package/src/generators/convert-to-application-executor/convert-to-application-executor.d.ts +4 -0
- package/src/generators/convert-to-application-executor/convert-to-application-executor.js +240 -0
- package/src/generators/convert-to-application-executor/schema.d.ts +4 -0
- package/src/generators/convert-to-application-executor/schema.json +26 -0
- package/src/generators/cypress-component-configuration/cypress-component-configuration.d.ts +2 -1
- package/src/generators/cypress-component-configuration/cypress-component-configuration.js +30 -14
- package/src/generators/cypress-component-configuration/schema.d.ts +1 -0
- package/src/generators/directive/schema.d.ts +3 -3
- package/src/generators/directive/schema.json +2 -2
- package/src/generators/federate-module/schema.json +1 -1
- package/src/generators/host/host.js +2 -0
- package/src/generators/host/schema.json +4 -4
- package/src/generators/init/schema.json +1 -1
- package/src/generators/library/lib/add-project.js +6 -3
- package/src/generators/library/library.js +2 -0
- package/src/generators/library/schema.json +1 -1
- package/src/generators/library-secondary-entry-point/schema.json +1 -1
- package/src/generators/move/schema.json +1 -1
- package/src/generators/ng-add/migrators/projects/e2e.migrator.js +1 -0
- package/src/generators/ng-add/schema.json +1 -1
- package/src/generators/ng-add/utilities/workspace.js +3 -1
- package/src/generators/ngrx/schema.json +1 -1
- package/src/generators/ngrx-feature-store/schema.json +1 -1
- package/src/generators/ngrx-root-store/schema.json +1 -1
- package/src/generators/pipe/schema.d.ts +3 -3
- package/src/generators/pipe/schema.json +2 -2
- package/src/generators/remote/remote.js +2 -0
- package/src/generators/remote/schema.json +4 -4
- package/src/generators/scam/schema.d.ts +3 -3
- package/src/generators/scam/schema.json +2 -2
- package/src/generators/scam-directive/schema.d.ts +3 -3
- package/src/generators/scam-directive/schema.json +2 -2
- package/src/generators/scam-pipe/schema.d.ts +3 -3
- package/src/generators/scam-pipe/schema.json +2 -2
- package/src/generators/scam-to-standalone/schema.json +1 -1
- package/src/generators/setup-mf/schema.json +1 -1
- package/src/generators/setup-ssr/lib/add-hydration.js +11 -5
- package/src/generators/setup-ssr/lib/update-project-config.js +3 -1
- package/src/generators/setup-ssr/schema.json +1 -1
- package/src/generators/setup-ssr/setup-ssr.js +2 -1
- package/src/generators/setup-tailwind/schema.json +1 -1
- package/src/generators/stories/schema.json +1 -1
- package/src/generators/storybook-configuration/schema.json +4 -4
- package/src/generators/storybook-configuration/storybook-configuration.js +1 -1
- package/src/generators/utils/add-jest.d.ts +1 -0
- package/src/generators/utils/add-jest.js +1 -0
- package/src/generators/utils/add-mf-env-to-inputs.d.ts +2 -0
- package/src/generators/utils/add-mf-env-to-inputs.js +24 -0
- package/src/migrations/update-17-1-0/replace-nguniversal-engines.js +2 -14
- package/src/migrations/update-18-0-0/add-mf-env-var-to-target-defaults.d.ts +2 -0
- package/src/migrations/update-18-0-0/add-mf-env-var-to-target-defaults.js +26 -0
- package/src/utils/targets.d.ts +2 -0
- package/src/utils/targets.js +17 -0
package/executors.d.ts
CHANGED
|
@@ -10,6 +10,6 @@ export * from './src/executors/application/application.impl';
|
|
|
10
10
|
import { executeDevServerBuilder } from './src/builders/dev-server/dev-server.impl';
|
|
11
11
|
export {
|
|
12
12
|
/**
|
|
13
|
-
* @deprecated Use executeDevServerBuilder instead. It will be removed in Nx
|
|
13
|
+
* @deprecated Use executeDevServerBuilder instead. It will be removed in Nx v19.
|
|
14
14
|
*/
|
|
15
15
|
executeDevServerBuilder as executeWebpackDevServerBuilder, executeDevServerBuilder, };
|
package/generators.d.ts
CHANGED
|
@@ -25,6 +25,6 @@ export * from './src/generators/setup-tailwind/setup-tailwind';
|
|
|
25
25
|
export * from './src/generators/stories/stories';
|
|
26
26
|
export * from './src/generators/storybook-configuration/storybook-configuration';
|
|
27
27
|
export * from './src/generators/web-worker/web-worker';
|
|
28
|
-
export
|
|
28
|
+
export { cypressComponentConfiguration } from './src/generators/cypress-component-configuration/cypress-component-configuration';
|
|
29
29
|
export * from './src/generators/component-test/component-test';
|
|
30
30
|
export * from './src/utils/test-runners';
|
package/generators.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.cypressComponentConfiguration = void 0;
|
|
3
4
|
const tslib_1 = require("tslib");
|
|
4
5
|
tslib_1.__exportStar(require("./src/generators/add-linting/add-linting"), exports);
|
|
5
6
|
tslib_1.__exportStar(require("./src/generators/application/application"), exports);
|
|
@@ -28,6 +29,7 @@ tslib_1.__exportStar(require("./src/generators/setup-tailwind/setup-tailwind"),
|
|
|
28
29
|
tslib_1.__exportStar(require("./src/generators/stories/stories"), exports);
|
|
29
30
|
tslib_1.__exportStar(require("./src/generators/storybook-configuration/storybook-configuration"), exports);
|
|
30
31
|
tslib_1.__exportStar(require("./src/generators/web-worker/web-worker"), exports);
|
|
31
|
-
|
|
32
|
+
var cypress_component_configuration_1 = require("./src/generators/cypress-component-configuration/cypress-component-configuration");
|
|
33
|
+
Object.defineProperty(exports, "cypressComponentConfiguration", { enumerable: true, get: function () { return cypress_component_configuration_1.cypressComponentConfiguration; } });
|
|
32
34
|
tslib_1.__exportStar(require("./src/generators/component-test/component-test"), exports);
|
|
33
35
|
tslib_1.__exportStar(require("./src/utils/test-runners"), exports);
|
package/generators.json
CHANGED
|
@@ -39,6 +39,11 @@
|
|
|
39
39
|
"schema": "./src/generators/component-test/schema.json",
|
|
40
40
|
"description": "Creates a cypress component test file for a component."
|
|
41
41
|
},
|
|
42
|
+
"convert-to-application-executor": {
|
|
43
|
+
"factory": "./src/generators/convert-to-application-executor/convert-to-application-executor",
|
|
44
|
+
"schema": "./src/generators/convert-to-application-executor/schema.json",
|
|
45
|
+
"description": "Converts projects to use the `@nx/angular:application` executor or the `@angular-devkit/build-angular:application` builder. _Note: this is only supported in Angular versions >= 17.0.0_."
|
|
46
|
+
},
|
|
42
47
|
"directive": {
|
|
43
48
|
"factory": "./src/generators/directive/directive",
|
|
44
49
|
"schema": "./src/generators/directive/schema.json",
|
|
@@ -81,7 +86,7 @@
|
|
|
81
86
|
"schema": "./src/generators/move/schema.json",
|
|
82
87
|
"aliases": ["mv"],
|
|
83
88
|
"description": "Moves an Angular application or library to another folder within the workspace and updates the project configuration.",
|
|
84
|
-
"x-deprecated": "Use the `@nx/workspace:move` generator instead. This generator will be removed in Nx
|
|
89
|
+
"x-deprecated": "Use the `@nx/workspace:move` generator instead. This generator will be removed in Nx v19."
|
|
85
90
|
},
|
|
86
91
|
"convert-to-with-mf": {
|
|
87
92
|
"factory": "./src/generators/convert-to-with-mf/convert-to-with-mf",
|
|
@@ -168,7 +173,7 @@
|
|
|
168
173
|
"description": "Adds Storybook configuration to a project."
|
|
169
174
|
},
|
|
170
175
|
"cypress-component-configuration": {
|
|
171
|
-
"factory": "./src/generators/cypress-component-configuration/cypress-component-configuration",
|
|
176
|
+
"factory": "./src/generators/cypress-component-configuration/cypress-component-configuration#cypressComponentConfigurationInternal",
|
|
172
177
|
"schema": "./src/generators/cypress-component-configuration/schema.json",
|
|
173
178
|
"description": "Setup Cypress component testing for a project."
|
|
174
179
|
},
|
package/migrations.json
CHANGED
|
@@ -356,6 +356,12 @@
|
|
|
356
356
|
},
|
|
357
357
|
"description": "Add 'autoprefixer' as dev dependency when '@nx/angular:ng-packagr-lite' or '@nx/angular:package` is used.",
|
|
358
358
|
"factory": "./src/migrations/update-17-3-0/add-autoprefixer-dependency"
|
|
359
|
+
},
|
|
360
|
+
"add-module-federation-env-var-to-target-defaults": {
|
|
361
|
+
"cli": "nx",
|
|
362
|
+
"version": "18.0.0-beta.0",
|
|
363
|
+
"description": "Add NX_MF_DEV_SERVER_STATIC_REMOTES to inputs for task hashing when '@nx/angular:webpack-browser' is used for Module Federation.",
|
|
364
|
+
"factory": "./src/migrations/update-18-0-0/add-mf-env-var-to-target-defaults"
|
|
359
365
|
}
|
|
360
366
|
},
|
|
361
367
|
"packageJsonUpdates": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/angular",
|
|
3
|
-
"version": "18.0.0-beta.
|
|
3
|
+
"version": "18.0.0-beta.2",
|
|
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": {
|
|
@@ -74,20 +74,20 @@
|
|
|
74
74
|
"ignore": "^5.0.4",
|
|
75
75
|
"magic-string": "~0.30.2",
|
|
76
76
|
"minimatch": "9.0.3",
|
|
77
|
-
"semver": "7.5.3",
|
|
77
|
+
"semver": "^7.5.3",
|
|
78
78
|
"tslib": "^2.3.0",
|
|
79
79
|
"webpack": "^5.80.0",
|
|
80
80
|
"webpack-merge": "^5.8.0",
|
|
81
|
-
"@nx/devkit": "18.0.0-beta.
|
|
82
|
-
"@nx/cypress": "18.0.0-beta.
|
|
83
|
-
"@nx/jest": "18.0.0-beta.
|
|
84
|
-
"@nx/js": "18.0.0-beta.
|
|
85
|
-
"@nx/eslint": "18.0.0-beta.
|
|
86
|
-
"@nx/webpack": "18.0.0-beta.
|
|
87
|
-
"@nx/web": "18.0.0-beta.
|
|
88
|
-
"@nx/workspace": "18.0.0-beta.
|
|
81
|
+
"@nx/devkit": "18.0.0-beta.2",
|
|
82
|
+
"@nx/cypress": "18.0.0-beta.2",
|
|
83
|
+
"@nx/jest": "18.0.0-beta.2",
|
|
84
|
+
"@nx/js": "18.0.0-beta.2",
|
|
85
|
+
"@nx/eslint": "18.0.0-beta.2",
|
|
86
|
+
"@nx/webpack": "18.0.0-beta.2",
|
|
87
|
+
"@nx/web": "18.0.0-beta.2",
|
|
88
|
+
"@nx/workspace": "18.0.0-beta.2",
|
|
89
89
|
"piscina": "^4.2.1",
|
|
90
|
-
"@nrwl/angular": "18.0.0-beta.
|
|
90
|
+
"@nrwl/angular": "18.0.0-beta.2"
|
|
91
91
|
},
|
|
92
92
|
"peerDependencies": {
|
|
93
93
|
"@angular-devkit/build-angular": ">= 15.0.0 < 18.0.0",
|
|
@@ -17,29 +17,4 @@ import { NxComponentTestingOptions } from '@nx/cypress/plugins/cypress-preset';
|
|
|
17
17
|
* @param pathToConfig will be used for loading project options and to construct the output paths for videos and screenshots
|
|
18
18
|
* @param options override options
|
|
19
19
|
*/
|
|
20
|
-
export declare function nxComponentTestingPreset(pathToConfig: string, options?: NxComponentTestingOptions):
|
|
21
|
-
specPattern: string[];
|
|
22
|
-
indexHtmlFile: string;
|
|
23
|
-
devServer: {
|
|
24
|
-
options: {
|
|
25
|
-
projectConfig: {
|
|
26
|
-
root: string;
|
|
27
|
-
sourceRoot: string;
|
|
28
|
-
buildOptions: import("@angular-devkit/build-angular").BrowserBuilderOptions & {
|
|
29
|
-
customWebpackConfig?: {
|
|
30
|
-
path: string;
|
|
31
|
-
};
|
|
32
|
-
indexFileTransformer?: string;
|
|
33
|
-
buildLibsFromSource?: boolean;
|
|
34
|
-
} & {
|
|
35
|
-
workspaceRoot: string;
|
|
36
|
-
};
|
|
37
|
-
};
|
|
38
|
-
};
|
|
39
|
-
framework: "angular";
|
|
40
|
-
bundler: "webpack";
|
|
41
|
-
};
|
|
42
|
-
videosFolder: string;
|
|
43
|
-
screenshotsFolder: string;
|
|
44
|
-
chromeWebSecurity: boolean;
|
|
45
|
-
};
|
|
20
|
+
export declare function nxComponentTestingPreset(pathToConfig: string, options?: NxComponentTestingOptions): any;
|
|
@@ -26,6 +26,13 @@ const semver_1 = require("semver");
|
|
|
26
26
|
* @param options override options
|
|
27
27
|
*/
|
|
28
28
|
function nxComponentTestingPreset(pathToConfig, options) {
|
|
29
|
+
if (global.NX_GRAPH_CREATION || global.NX_CYPRESS_INIT_GENERATOR_RUNNING) {
|
|
30
|
+
// this is only used by plugins, so we don't need the component testing
|
|
31
|
+
// options, cast to any to avoid type errors
|
|
32
|
+
return (0, cypress_preset_1.nxBaseCypressPreset)(pathToConfig, {
|
|
33
|
+
testingType: 'component',
|
|
34
|
+
});
|
|
35
|
+
}
|
|
29
36
|
let graph;
|
|
30
37
|
try {
|
|
31
38
|
graph = (0, devkit_1.readCachedProjectGraph)();
|
|
@@ -41,7 +48,10 @@ ${e.stack ? e.stack : e}`);
|
|
|
41
48
|
const ctProjectConfig = (0, ct_helpers_1.getProjectConfigByPath)(graph, pathToConfig);
|
|
42
49
|
const ctConfigurationName = process.env.NX_CYPRESS_TARGET_CONFIGURATION;
|
|
43
50
|
const ctContext = (0, ct_helpers_1.createExecutorContext)(graph, ctProjectConfig.targets, ctProjectConfig.name, options?.ctTargetName || 'component-test', ctConfigurationName);
|
|
44
|
-
const buildTarget =
|
|
51
|
+
const buildTarget = options?.buildTarget
|
|
52
|
+
? (0, devkit_1.parseTargetString)(options.buildTarget, graph)
|
|
53
|
+
: // for backwards compat, if no buildTargetin the preset options, get it from the target options
|
|
54
|
+
getBuildableTarget(ctContext);
|
|
45
55
|
if (!buildTarget.project && !graph.nodes?.[buildTarget.project]?.data) {
|
|
46
56
|
throw new Error((0, devkit_1.stripIndents) `Unable to find project configuration for build target.
|
|
47
57
|
Project Name? ${buildTarget.project}
|
|
@@ -16,7 +16,7 @@ const buildable_libs_1 = require("../utilities/buildable-libs");
|
|
|
16
16
|
const webpack_1 = require("../utilities/webpack");
|
|
17
17
|
const lib_1 = require("./lib");
|
|
18
18
|
function executeDevServerBuilder(rawOptions, context) {
|
|
19
|
-
if (rawOptions.esbuildMiddleware) {
|
|
19
|
+
if (rawOptions.esbuildMiddleware?.length > 0) {
|
|
20
20
|
const { major: angularMajorVersion, version: angularVersion } = (0, angular_version_utils_1.getInstalledAngularVersionInfo)();
|
|
21
21
|
if (angularMajorVersion < 17) {
|
|
22
22
|
throw new Error((0, devkit_1.stripIndents) `The "esbuildMiddleware" option is only supported in Angular >= 17.0.0. You are currently using "${angularVersion}".
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"type": "string",
|
|
18
18
|
"description": "A browser builder target to serve in the format of `project:target[:configuration]`. Ignored if `buildTarget` is set.",
|
|
19
19
|
"pattern": "^[^:\\s]+:[^:\\s]+(:[^\\s]+)?$",
|
|
20
|
-
"x-deprecated": "Use 'buildTarget' instead. It will be removed in Nx
|
|
20
|
+
"x-deprecated": "Use 'buildTarget' instead. It will be removed in Nx v19."
|
|
21
21
|
},
|
|
22
22
|
"buildTarget": {
|
|
23
23
|
"type": "string",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"type": "string",
|
|
16
16
|
"description": "A browser builder target to serve in the format of `project:target[:configuration]`.",
|
|
17
17
|
"pattern": "^[^:\\s]+:[^:\\s]+(:[^\\s]+)?$",
|
|
18
|
-
"x-deprecated": "Use 'buildTarget' instead. It will be removed in Nx
|
|
18
|
+
"x-deprecated": "Use 'buildTarget' instead. It will be removed in Nx v19."
|
|
19
19
|
},
|
|
20
20
|
"buildTarget": {
|
|
21
21
|
"type": "string",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 2,
|
|
3
3
|
"outputCapture": "direct-nodejs",
|
|
4
|
-
"$schema": "
|
|
4
|
+
"$schema": "https://json-schema.org/schema",
|
|
5
5
|
"title": "ng-packagr Target",
|
|
6
6
|
"description": "Builds a library with support for incremental builds.\n\nThis executor is meant to be used with buildable libraries in an incremental build scenario. It is similar to the `@nx/angular:package` executor but with some key differences:\n- For supported Angular versions lower than v16, it doesn't run `ngcc` automatically (`ngcc` is no longer available from Angular v16 onwards, for lower versions, it needs to be run separately beforehand if needed, this can be done in a `postinstall` hook on `package.json`).\n- It only produces ESM2022 bundles (ESM2020 for supported Angular versions lower than v16).",
|
|
7
7
|
"cli": "nx",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 2,
|
|
3
3
|
"outputCapture": "direct-nodejs",
|
|
4
|
-
"$schema": "
|
|
4
|
+
"$schema": "https://json-schema.org/schema",
|
|
5
5
|
"title": "ng-packagr Target",
|
|
6
6
|
"description": "Builds and packages an Angular library producing an output following the Angular Package Format (APF) to be distributed as an NPM package.\n\nThis executor is similar to the `@angular-devkit/build-angular:ng-packagr` with additional support for incremental builds.",
|
|
7
7
|
"cli": "nx",
|
|
@@ -20,6 +20,7 @@ async function addLintingGenerator(tree, options) {
|
|
|
20
20
|
setParserOptionsProject: options.setParserOptionsProject,
|
|
21
21
|
skipFormat: true,
|
|
22
22
|
rootProject: rootProject,
|
|
23
|
+
addPlugin: options.addPlugin,
|
|
23
24
|
});
|
|
24
25
|
tasks.push(lintTask);
|
|
25
26
|
if ((0, eslint_file_1.isEslintConfigSupported)(tree)) {
|
|
@@ -8,9 +8,11 @@ const setup_ssr_1 = require("../setup-ssr/setup-ssr");
|
|
|
8
8
|
const setup_tailwind_1 = require("../setup-tailwind/setup-tailwind");
|
|
9
9
|
const ensure_angular_dependencies_1 = require("../utils/ensure-angular-dependencies");
|
|
10
10
|
const lib_1 = require("./lib");
|
|
11
|
+
const log_show_project_command_1 = require("@nx/devkit/src/utils/log-show-project-command");
|
|
11
12
|
async function applicationGenerator(tree, schema) {
|
|
12
13
|
return await applicationGeneratorInternal(tree, {
|
|
13
14
|
projectNameAndRootFormat: 'derived',
|
|
15
|
+
addPlugin: false,
|
|
14
16
|
...schema,
|
|
15
17
|
});
|
|
16
18
|
}
|
|
@@ -68,6 +70,7 @@ async function applicationGeneratorInternal(tree, schema) {
|
|
|
68
70
|
}
|
|
69
71
|
return () => {
|
|
70
72
|
(0, devkit_1.installPackagesTask)(tree);
|
|
73
|
+
(0, log_show_project_command_1.logShowProjectCommand)(options.name);
|
|
71
74
|
};
|
|
72
75
|
}
|
|
73
76
|
exports.applicationGeneratorInternal = applicationGeneratorInternal;
|
|
@@ -746,6 +746,25 @@ nx g @nx/angular:lib ui
|
|
|
746
746
|
<span># Add a component</span>
|
|
747
747
|
nx g @nx/angular:component ui/src/lib/button</pre>
|
|
748
748
|
</details>
|
|
749
|
+
<details>
|
|
750
|
+
<summary>
|
|
751
|
+
<svg
|
|
752
|
+
fill="none"
|
|
753
|
+
stroke="currentColor"
|
|
754
|
+
viewBox="0 0 24 24"
|
|
755
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
756
|
+
>
|
|
757
|
+
<path
|
|
758
|
+
strokeLinecap="round"
|
|
759
|
+
strokeLinejoin="round"
|
|
760
|
+
strokeWidth="2"
|
|
761
|
+
d="M8 9l3 3-3 3m5 0h3M5 20h14a2 2 0 002-2V6a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"
|
|
762
|
+
/>
|
|
763
|
+
</svg>
|
|
764
|
+
View project details
|
|
765
|
+
</summary>
|
|
766
|
+
<pre>nx show project <%= appName %> --web</pre>
|
|
767
|
+
</details>
|
|
749
768
|
<details>
|
|
750
769
|
<summary>
|
|
751
770
|
<svg
|
|
@@ -749,6 +749,25 @@ nx g @nx/angular:lib ui
|
|
|
749
749
|
<span># Add a component</span>
|
|
750
750
|
nx g @nx/angular:component ui/src/lib/button</pre>
|
|
751
751
|
</details>
|
|
752
|
+
<details>
|
|
753
|
+
<summary>
|
|
754
|
+
<svg
|
|
755
|
+
fill="none"
|
|
756
|
+
stroke="currentColor"
|
|
757
|
+
viewBox="0 0 24 24"
|
|
758
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
759
|
+
>
|
|
760
|
+
<path
|
|
761
|
+
strokeLinecap="round"
|
|
762
|
+
strokeLinejoin="round"
|
|
763
|
+
strokeWidth="2"
|
|
764
|
+
d="M8 9l3 3-3 3m5 0h3M5 20h14a2 2 0 002-2V6a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"
|
|
765
|
+
/>
|
|
766
|
+
</svg>
|
|
767
|
+
View project details
|
|
768
|
+
</summary>
|
|
769
|
+
<pre>nx show project <%= appName %> --web</pre>
|
|
770
|
+
</details>
|
|
752
771
|
<details>
|
|
753
772
|
<summary>
|
|
754
773
|
<svg
|
|
@@ -26,6 +26,7 @@ async function addE2e(tree, options) {
|
|
|
26
26
|
devServerTarget: `${options.name}:serve:development`,
|
|
27
27
|
baseUrl: 'http://localhost:4200',
|
|
28
28
|
rootProject: options.rootProject,
|
|
29
|
+
addPlugin: options.addPlugin,
|
|
29
30
|
});
|
|
30
31
|
}
|
|
31
32
|
else if (options.e2eTestRunner === 'playwright') {
|
|
@@ -48,6 +49,7 @@ async function addE2e(tree, options) {
|
|
|
48
49
|
webServerCommand: `${(0, devkit_1.getPackageManagerCommand)().exec} nx serve ${options.name}`,
|
|
49
50
|
webServerAddress: `http://localhost:${options.port ?? 4200}`,
|
|
50
51
|
rootProject: options.rootProject,
|
|
52
|
+
addPlugin: options.addPlugin,
|
|
51
53
|
});
|
|
52
54
|
}
|
|
53
55
|
}
|
|
@@ -19,6 +19,7 @@ async function normalizeOptions(host, options) {
|
|
|
19
19
|
});
|
|
20
20
|
options.rootProject = appProjectRoot === '.';
|
|
21
21
|
options.projectNameAndRootFormat = projectNameAndRootFormat;
|
|
22
|
+
options.addPlugin ??= process.env.NX_ADD_PLUGINS !== 'false';
|
|
22
23
|
const e2eProjectName = options.rootProject ? 'e2e' : `${appProjectName}-e2e`;
|
|
23
24
|
const e2eProjectRoot = options.rootProject ? 'e2e' : `${appProjectRoot}-e2e`;
|
|
24
25
|
const parsedTags = options.tags
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"$schema": "
|
|
2
|
+
"$schema": "https://json-schema.org/schema",
|
|
3
3
|
"$id": "GeneratorNxApp",
|
|
4
4
|
"title": "Creates an Angular application.",
|
|
5
5
|
"description": "Creates an Angular application.",
|
|
@@ -41,15 +41,15 @@
|
|
|
41
41
|
},
|
|
42
42
|
{
|
|
43
43
|
"value": "scss",
|
|
44
|
-
"label": "SASS(.scss) [
|
|
44
|
+
"label": "SASS(.scss) [ https://sass-lang.com ]"
|
|
45
45
|
},
|
|
46
46
|
{
|
|
47
47
|
"value": "sass",
|
|
48
|
-
"label": "SASS(.sass) [
|
|
48
|
+
"label": "SASS(.sass) [ https://sass-lang.com ]"
|
|
49
49
|
},
|
|
50
50
|
{
|
|
51
51
|
"value": "less",
|
|
52
|
-
"label": "LESS [
|
|
52
|
+
"label": "LESS [ https://lesscss.org ]"
|
|
53
53
|
}
|
|
54
54
|
]
|
|
55
55
|
}
|
|
@@ -22,15 +22,15 @@ export interface Schema {
|
|
|
22
22
|
skipFormat?: boolean;
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
|
-
* @deprecated Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx
|
|
25
|
+
* @deprecated Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v19.
|
|
26
26
|
*/
|
|
27
27
|
flat?: boolean;
|
|
28
28
|
/**
|
|
29
|
-
* @deprecated Provide the `directory` option instead. It will be removed in Nx
|
|
29
|
+
* @deprecated Provide the `directory` option instead. It will be removed in Nx v19.
|
|
30
30
|
*/
|
|
31
31
|
path?: string;
|
|
32
32
|
/**
|
|
33
|
-
* @deprecated Provide the `directory` option instead. The project will be determined from the directory provided. It will be removed in Nx
|
|
33
|
+
* @deprecated Provide the `directory` option instead. The project will be determined from the directory provided. It will be removed in Nx v19.
|
|
34
34
|
*/
|
|
35
35
|
project?: string;
|
|
36
36
|
}
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"$source": "projectName"
|
|
35
35
|
},
|
|
36
36
|
"x-dropdown": "projects",
|
|
37
|
-
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. The project will be determined from the directory provided. It will be removed in Nx
|
|
37
|
+
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. The project will be determined from the directory provided. It will be removed in Nx v19."
|
|
38
38
|
},
|
|
39
39
|
"prefix": {
|
|
40
40
|
"type": "string",
|
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
"type": "boolean",
|
|
99
99
|
"description": "Create the new files at the top level of the current project.",
|
|
100
100
|
"default": false,
|
|
101
|
-
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx
|
|
101
|
+
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v19."
|
|
102
102
|
},
|
|
103
103
|
"skipImport": {
|
|
104
104
|
"type": "boolean",
|