@nx/angular 20.0.0-canary.20240928-f221a41 → 20.0.0-canary.20241002-1d10a19
Sign up to get free protection for your applications and to get access to all the features.
- package/package.json +8 -8
- package/src/builders/utilities/webpack.js +3 -3
- package/src/generators/application/lib/normalize-options.js +3 -4
- package/src/generators/application/schema.d.ts +2 -4
- package/src/generators/application/schema.json +7 -12
- package/src/generators/component/lib/normalize-options.js +1 -2
- package/src/generators/component/schema.d.ts +2 -5
- package/src/generators/component/schema.json +7 -13
- package/src/generators/directive/lib/normalize-options.js +1 -2
- package/src/generators/directive/schema.d.ts +2 -3
- package/src/generators/directive/schema.json +8 -14
- package/src/generators/federate-module/lib/add-remote.js +0 -2
- package/src/generators/federate-module/schema.d.ts +0 -2
- package/src/generators/federate-module/schema.json +0 -5
- package/src/generators/host/host.js +2 -3
- package/src/generators/host/schema.d.ts +2 -4
- package/src/generators/host/schema.json +10 -13
- package/src/generators/library/lib/add-standalone-component.js +3 -2
- package/src/generators/library/lib/normalize-options.js +1 -1
- package/src/generators/library/lib/normalized-schema.d.ts +2 -2
- package/src/generators/library/schema.d.ts +2 -4
- package/src/generators/library/schema.json +7 -13
- package/src/generators/move/schema.d.ts +0 -3
- package/src/generators/move/schema.json +0 -5
- package/src/generators/pipe/lib/normalize-options.js +1 -2
- package/src/generators/pipe/schema.d.ts +2 -3
- package/src/generators/pipe/schema.json +7 -22
- package/src/generators/remote/remote.js +2 -3
- package/src/generators/remote/schema.d.ts +2 -4
- package/src/generators/remote/schema.json +10 -13
- package/src/generators/scam/lib/normalize-options.js +1 -2
- package/src/generators/scam/scam.js +0 -2
- package/src/generators/scam/schema.d.ts +3 -3
- package/src/generators/scam/schema.json +8 -23
- package/src/generators/scam-directive/lib/normalize-options.js +1 -2
- package/src/generators/scam-directive/scam-directive.js +0 -2
- package/src/generators/scam-directive/schema.d.ts +3 -3
- package/src/generators/scam-directive/schema.json +8 -3
- package/src/generators/scam-pipe/lib/normalize-options.js +1 -2
- package/src/generators/scam-pipe/scam-pipe.js +0 -2
- package/src/generators/scam-pipe/schema.d.ts +3 -3
- package/src/generators/scam-pipe/schema.json +8 -23
- package/src/generators/utils/testing.js +14 -17
- package/src/utils/versions.d.ts +1 -1
- package/src/utils/versions.js +1 -1
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@nx/angular",
|
3
|
-
"version": "20.0.0-canary.
|
3
|
+
"version": "20.0.0-canary.20241002-1d10a19",
|
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, Playwright 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- Single Component Application Modules (SCAMs) \n\n- NgRx helpers. \n\n- Utilities for automatic workspace refactoring.",
|
6
6
|
"repository": {
|
@@ -79,13 +79,13 @@
|
|
79
79
|
"tslib": "^2.3.0",
|
80
80
|
"webpack-merge": "^5.8.0",
|
81
81
|
"webpack": "^5.88.0",
|
82
|
-
"@module-federation/enhanced": "
|
83
|
-
"@nx/devkit": "20.0.0-canary.
|
84
|
-
"@nx/js": "20.0.0-canary.
|
85
|
-
"@nx/eslint": "20.0.0-canary.
|
86
|
-
"@nx/webpack": "20.0.0-canary.
|
87
|
-
"@nx/web": "20.0.0-canary.
|
88
|
-
"@nx/workspace": "20.0.0-canary.
|
82
|
+
"@module-federation/enhanced": "0.6.6",
|
83
|
+
"@nx/devkit": "20.0.0-canary.20241002-1d10a19",
|
84
|
+
"@nx/js": "20.0.0-canary.20241002-1d10a19",
|
85
|
+
"@nx/eslint": "20.0.0-canary.20241002-1d10a19",
|
86
|
+
"@nx/webpack": "20.0.0-canary.20241002-1d10a19",
|
87
|
+
"@nx/web": "20.0.0-canary.20241002-1d10a19",
|
88
|
+
"@nx/workspace": "20.0.0-canary.20241002-1d10a19",
|
89
89
|
"piscina": "^4.4.0"
|
90
90
|
},
|
91
91
|
"peerDependencies": {
|
@@ -16,11 +16,11 @@ async function mergeCustomWebpackConfig(baseWebpackConfig, pathToWebpackConfig,
|
|
16
16
|
// `module.exports = new Promise(...)`. If it exports a single object, but not a Promise,
|
17
17
|
// then await will just resolve that object.
|
18
18
|
const config = await customWebpackConfiguration;
|
19
|
-
// The extra Webpack configuration file can export a synchronous or asynchronous function,
|
20
|
-
// for instance: `module.exports = async config => { ... }`.
|
21
19
|
let newConfig;
|
22
20
|
if (typeof config === 'function') {
|
23
|
-
|
21
|
+
// The extra Webpack configuration file can export a synchronous or asynchronous function,
|
22
|
+
// for instance: `module.exports = async config => { ... }`.
|
23
|
+
newConfig = await config(baseWebpackConfig, options, target);
|
24
24
|
}
|
25
25
|
else {
|
26
26
|
newConfig = (0, webpack_merge_1.merge)(baseWebpackConfig, config);
|
@@ -7,16 +7,14 @@ const eslint_1 = require("@nx/eslint");
|
|
7
7
|
const test_runners_1 = require("../../../utils/test-runners");
|
8
8
|
const version_utils_1 = require("../../utils/version-utils");
|
9
9
|
async function normalizeOptions(host, options) {
|
10
|
-
|
10
|
+
await (0, project_name_and_root_utils_1.ensureProjectName)(host, options, 'application');
|
11
|
+
const { projectName: appProjectName, projectRoot: appProjectRoot } = await (0, project_name_and_root_utils_1.determineProjectNameAndRootOptions)(host, {
|
11
12
|
name: options.name,
|
12
13
|
projectType: 'application',
|
13
14
|
directory: options.directory,
|
14
|
-
projectNameAndRootFormat: options.projectNameAndRootFormat,
|
15
15
|
rootProject: options.rootProject,
|
16
16
|
});
|
17
17
|
options.rootProject = appProjectRoot === '.';
|
18
|
-
options.projectNameAndRootFormat = projectNameAndRootFormat;
|
19
|
-
const nxJson = (0, devkit_1.readNxJson)(host);
|
20
18
|
const e2eProjectName = options.rootProject ? 'e2e' : `${appProjectName}-e2e`;
|
21
19
|
const e2eProjectRoot = options.rootProject ? 'e2e' : `${appProjectRoot}-e2e`;
|
22
20
|
const parsedTags = options.tags
|
@@ -40,6 +38,7 @@ async function normalizeOptions(host, options) {
|
|
40
38
|
linter: eslint_1.Linter.EsLint,
|
41
39
|
strict: true,
|
42
40
|
standalone: true,
|
41
|
+
directory: appProjectRoot,
|
43
42
|
...options,
|
44
43
|
prefix: options.prefix || 'app',
|
45
44
|
name: appProjectName,
|
@@ -1,10 +1,10 @@
|
|
1
|
-
import type { ProjectNameAndRootFormat } from '@nx/devkit/src/generators/project-name-and-root-utils';
|
2
1
|
import type { Linter, LinterType } from '@nx/eslint';
|
3
2
|
import type { E2eTestRunner, UnitTestRunner } from '../../utils/test-runners';
|
4
3
|
import type { Styles } from '../utils/types';
|
5
4
|
|
6
5
|
export interface Schema {
|
7
|
-
|
6
|
+
directory: string;
|
7
|
+
name?: string;
|
8
8
|
addTailwind?: boolean;
|
9
9
|
skipFormat?: boolean;
|
10
10
|
inlineStyle?: boolean;
|
@@ -14,8 +14,6 @@ export interface Schema {
|
|
14
14
|
prefix?: string;
|
15
15
|
style?: Styles;
|
16
16
|
skipTests?: boolean;
|
17
|
-
directory?: string;
|
18
|
-
projectNameAndRootFormat?: ProjectNameAndRootFormat;
|
19
17
|
tags?: string;
|
20
18
|
linter?: Linter | LinterType;
|
21
19
|
unitTestRunner?: UnitTestRunner;
|
@@ -6,26 +6,21 @@
|
|
6
6
|
"type": "object",
|
7
7
|
"cli": "nx",
|
8
8
|
"properties": {
|
9
|
-
"
|
10
|
-
"description": "The
|
9
|
+
"directory": {
|
10
|
+
"description": "The directory of the new application.",
|
11
11
|
"type": "string",
|
12
12
|
"$default": {
|
13
13
|
"$source": "argv",
|
14
14
|
"index": 0
|
15
15
|
},
|
16
|
-
"x-prompt": "
|
17
|
-
"pattern": "^[a-zA-Z][^:]*$"
|
16
|
+
"x-prompt": "Which directory do you want to create the application in?"
|
18
17
|
},
|
19
|
-
"
|
20
|
-
"description": "The
|
18
|
+
"name": {
|
19
|
+
"description": "The name of the application.",
|
21
20
|
"type": "string",
|
21
|
+
"pattern": "^[a-zA-Z][^:]*$",
|
22
22
|
"x-priority": "important"
|
23
23
|
},
|
24
|
-
"projectNameAndRootFormat": {
|
25
|
-
"description": "Whether to generate the project name and root directory as provided (`as-provided`) or generate them composing their values and taking the configured layout into account (`derived`).",
|
26
|
-
"type": "string",
|
27
|
-
"enum": ["as-provided", "derived"]
|
28
|
-
},
|
29
24
|
"style": {
|
30
25
|
"description": "The file extension to be used for style files.",
|
31
26
|
"type": "string",
|
@@ -187,6 +182,6 @@
|
|
187
182
|
}
|
188
183
|
},
|
189
184
|
"additionalProperties": false,
|
190
|
-
"required": ["
|
185
|
+
"required": ["directory"],
|
191
186
|
"examplesFile": "../../../docs/application-examples.md"
|
192
187
|
}
|
@@ -8,8 +8,7 @@ async function normalizeOptions(tree, options) {
|
|
8
8
|
options.type ??= 'component';
|
9
9
|
const { artifactName: name, directory, fileName, filePath, project: projectName, } = await (0, artifact_name_and_directory_utils_1.determineArtifactNameAndDirectoryOptions)(tree, {
|
10
10
|
name: options.name,
|
11
|
-
|
12
|
-
nameAndDirectoryFormat: options.nameAndDirectoryFormat,
|
11
|
+
path: options.path,
|
13
12
|
suffix: options.type ?? 'component',
|
14
13
|
});
|
15
14
|
const { className } = (0, devkit_1.names)(name);
|
@@ -1,9 +1,6 @@
|
|
1
|
-
import type { NameAndDirectoryFormat } from '@nx/devkit/src/generators/artifact-name-and-directory-utils';
|
2
|
-
|
3
1
|
export interface Schema {
|
4
|
-
|
5
|
-
|
6
|
-
nameAndDirectoryFormat?: NameAndDirectoryFormat;
|
2
|
+
path: string;
|
3
|
+
name?: string;
|
7
4
|
displayBlock?: boolean;
|
8
5
|
inlineStyle?: boolean;
|
9
6
|
inlineTemplate?: boolean;
|
@@ -7,25 +7,19 @@
|
|
7
7
|
"description": "Creates a new Angular component.",
|
8
8
|
"additionalProperties": false,
|
9
9
|
"properties": {
|
10
|
-
"
|
10
|
+
"path": {
|
11
11
|
"type": "string",
|
12
|
-
"description": "The
|
12
|
+
"description": "The path at which to create the component file, relative to the workspace root. By default, it is set to the root of the project.",
|
13
13
|
"$default": {
|
14
14
|
"$source": "argv",
|
15
15
|
"index": 0
|
16
16
|
},
|
17
|
-
"x-prompt": "
|
17
|
+
"x-prompt": "Where to create the component?"
|
18
18
|
},
|
19
|
-
"
|
20
|
-
"type": "string",
|
21
|
-
"description": "The directory at which to create the component file. When `--nameAndDirectoryFormat=as-provided`, it will be relative to the current working directory. Otherwise, it will be relative to the workspace root.",
|
22
|
-
"aliases": ["dir", "path"],
|
23
|
-
"x-priority": "important"
|
24
|
-
},
|
25
|
-
"nameAndDirectoryFormat": {
|
26
|
-
"description": "Whether to generate the component in the directory as provided, relative to the current working directory and ignoring the project (`as-provided`) or generate it using the project and directory relative to the workspace root (`derived`).",
|
19
|
+
"name": {
|
27
20
|
"type": "string",
|
28
|
-
"
|
21
|
+
"description": "The name of the component.",
|
22
|
+
"x-prompt": "What name would you like to use for the component?"
|
29
23
|
},
|
30
24
|
"prefix": {
|
31
25
|
"type": "string",
|
@@ -118,6 +112,6 @@
|
|
118
112
|
"x-priority": "internal"
|
119
113
|
}
|
120
114
|
},
|
121
|
-
"required": ["
|
115
|
+
"required": ["path"],
|
122
116
|
"examplesFile": "../../../docs/component-examples.md"
|
123
117
|
}
|
@@ -7,8 +7,7 @@ const artifact_name_and_directory_utils_1 = require("@nx/devkit/src/generators/a
|
|
7
7
|
async function normalizeOptions(tree, options) {
|
8
8
|
const { artifactName: name, directory, fileName, filePath, project: projectName, } = await (0, artifact_name_and_directory_utils_1.determineArtifactNameAndDirectoryOptions)(tree, {
|
9
9
|
name: options.name,
|
10
|
-
|
11
|
-
nameAndDirectoryFormat: options.nameAndDirectoryFormat,
|
10
|
+
path: options.path,
|
12
11
|
suffix: 'directive',
|
13
12
|
});
|
14
13
|
const { className } = (0, devkit_1.names)(name);
|
@@ -1,9 +1,8 @@
|
|
1
1
|
import { NameAndDirectoryFormat } from '@nx/devkit/src/generators/artifact-name-and-directory-utils';
|
2
2
|
|
3
3
|
export interface Schema {
|
4
|
-
|
5
|
-
|
6
|
-
nameAndDirectoryFormat?: NameAndDirectoryFormat;
|
4
|
+
path: string;
|
5
|
+
name?: string;
|
7
6
|
prefix?: string;
|
8
7
|
skipTests?: boolean;
|
9
8
|
skipImport?: boolean;
|
@@ -7,25 +7,19 @@
|
|
7
7
|
"description": "Creates a new Angular directive.",
|
8
8
|
"additionalProperties": false,
|
9
9
|
"properties": {
|
10
|
-
"
|
10
|
+
"path": {
|
11
11
|
"type": "string",
|
12
|
-
"description": "The
|
12
|
+
"description": "The path at which to create the directive file.",
|
13
|
+
"x-prompt": "Where to put the directive?",
|
13
14
|
"$default": {
|
14
15
|
"$source": "argv",
|
15
16
|
"index": 0
|
16
|
-
}
|
17
|
-
"x-prompt": "What name would you like to use for the directive?"
|
18
|
-
},
|
19
|
-
"directory": {
|
20
|
-
"type": "string",
|
21
|
-
"description": "The directory at which to create the directive file. When `--nameAndDirectoryFormat=as-provided`, it will be relative to the current working directory. Otherwise, it will be relative to the workspace root.",
|
22
|
-
"aliases": ["dir", "path"],
|
23
|
-
"x-priority": "important"
|
17
|
+
}
|
24
18
|
},
|
25
|
-
"
|
26
|
-
"description": "Whether to generate the directive in the directory as provided, relative to the current working directory and ignoring the project (`as-provided`) or generate it using the project and directory relative to the workspace root (`derived`).",
|
19
|
+
"name": {
|
27
20
|
"type": "string",
|
28
|
-
"
|
21
|
+
"description": "The name of the new directive.",
|
22
|
+
"x-prompt": "What name would you like to use for the directive?"
|
29
23
|
},
|
30
24
|
"prefix": {
|
31
25
|
"type": "string",
|
@@ -77,5 +71,5 @@
|
|
77
71
|
"description": "Skip formatting of files."
|
78
72
|
}
|
79
73
|
},
|
80
|
-
"required": ["
|
74
|
+
"required": ["path"]
|
81
75
|
}
|
@@ -16,7 +16,6 @@ async function addRemote(tree, schema) {
|
|
16
16
|
directory: schema.remoteDirectory,
|
17
17
|
host: schema.host,
|
18
18
|
standalone: schema.standalone,
|
19
|
-
projectNameAndRootFormat: schema.projectNameAndRootFormat,
|
20
19
|
unitTestRunner: schema.unitTestRunner ?? test_runners_1.UnitTestRunner.Jest,
|
21
20
|
e2eTestRunner: schema.e2eTestRunner ?? test_runners_1.E2eTestRunner.Cypress,
|
22
21
|
skipFormat: true,
|
@@ -26,7 +25,6 @@ async function addRemote(tree, schema) {
|
|
26
25
|
name: schema.remote,
|
27
26
|
directory: schema.remoteDirectory,
|
28
27
|
projectType: 'application',
|
29
|
-
projectNameAndRootFormat: schema.projectNameAndRootFormat,
|
30
28
|
});
|
31
29
|
projectRoot = remoteRoot;
|
32
30
|
remoteName = projectName;
|
@@ -1,4 +1,3 @@
|
|
1
|
-
import { type ProjectNameAndRootFormat } from '@nx/devkit/src/generators/project-name-and-root-utils';
|
2
1
|
import { UnitTestRunner, E2eTestRunner } from '../utils/testing';
|
3
2
|
|
4
3
|
export interface Schema {
|
@@ -7,7 +6,6 @@ export interface Schema {
|
|
7
6
|
remote: string;
|
8
7
|
remoteDirectory?: string;
|
9
8
|
host?: string;
|
10
|
-
projectNameAndRootFormat?: ProjectNameAndRootFormat;
|
11
9
|
unitTestRunner?: UnitTestRunner;
|
12
10
|
e2eTestRunner?: E2eTestRunner;
|
13
11
|
standalone?: boolean;
|
@@ -37,11 +37,6 @@
|
|
37
37
|
"description": "The directory of the new remote application if one needs to be created.",
|
38
38
|
"type": "string"
|
39
39
|
},
|
40
|
-
"projectNameAndRootFormat": {
|
41
|
-
"description": "Whether to generate the project name and root directory as provided (`as-provided`) or generate them composing their values and taking the configured layout into account (`derived`).",
|
42
|
-
"type": "string",
|
43
|
-
"enum": ["as-provided", "derived"]
|
44
|
-
},
|
45
40
|
"style": {
|
46
41
|
"description": "The file extension to be used for style files for the remote if one needs to be created.",
|
47
42
|
"type": "string",
|
@@ -37,13 +37,12 @@ async function host(tree, schema) {
|
|
37
37
|
}
|
38
38
|
});
|
39
39
|
}
|
40
|
-
|
40
|
+
await (0, project_name_and_root_utils_1.ensureProjectName)(tree, options, 'application');
|
41
|
+
const { projectName: hostProjectName, projectRoot: appRoot } = await (0, project_name_and_root_utils_1.determineProjectNameAndRootOptions)(tree, {
|
41
42
|
name: options.name,
|
42
43
|
projectType: 'application',
|
43
44
|
directory: options.directory,
|
44
|
-
projectNameAndRootFormat: options.projectNameAndRootFormat,
|
45
45
|
});
|
46
|
-
options.projectNameAndRootFormat = projectNameAndRootFormat;
|
47
46
|
const appInstallTask = await (0, application_1.default)(tree, {
|
48
47
|
...options,
|
49
48
|
standalone: options.standalone,
|
@@ -1,10 +1,10 @@
|
|
1
|
-
import type { ProjectNameAndRootFormat } from '@nx/devkit/src/generators/project-name-and-root-utils';
|
2
1
|
import type { Linter, LinterType } from '@nx/eslint';
|
3
2
|
import type { E2eTestRunner, UnitTestRunner } from '../../utils/test-runners';
|
4
3
|
import type { Styles } from '../utils/types';
|
5
4
|
|
6
5
|
export interface Schema {
|
7
|
-
|
6
|
+
directory: string;
|
7
|
+
name?: string;
|
8
8
|
remotes?: string[];
|
9
9
|
dynamic?: boolean;
|
10
10
|
setParserOptionsProject?: boolean;
|
@@ -14,8 +14,6 @@ export interface Schema {
|
|
14
14
|
prefix?: string;
|
15
15
|
style?: Styles;
|
16
16
|
skipTests?: boolean;
|
17
|
-
directory?: string;
|
18
|
-
projectNameAndRootFormat?: ProjectNameAndRootFormat;
|
19
17
|
tags?: string;
|
20
18
|
linter?: Linter | LinterType;
|
21
19
|
unitTestRunner?: UnitTestRunner;
|
@@ -12,14 +12,20 @@
|
|
12
12
|
}
|
13
13
|
],
|
14
14
|
"properties": {
|
15
|
-
"
|
15
|
+
"directory": {
|
16
|
+
"description": "The directory of the new application.",
|
16
17
|
"type": "string",
|
17
|
-
"description": "The name to give to the host Angular application.",
|
18
18
|
"$default": {
|
19
19
|
"$source": "argv",
|
20
20
|
"index": 0
|
21
21
|
},
|
22
|
-
"
|
22
|
+
"x-prompt": "Which directory do you want to create the application in?"
|
23
|
+
},
|
24
|
+
"name": {
|
25
|
+
"type": "string",
|
26
|
+
"description": "The name to give to the host Angular application.",
|
27
|
+
"pattern": "^[a-zA-Z][^:]*$",
|
28
|
+
"x-priority": "important"
|
23
29
|
},
|
24
30
|
"remotes": {
|
25
31
|
"type": "array",
|
@@ -31,15 +37,6 @@
|
|
31
37
|
"description": "Should the host application use dynamic federation?",
|
32
38
|
"default": false
|
33
39
|
},
|
34
|
-
"directory": {
|
35
|
-
"description": "The directory of the new application.",
|
36
|
-
"type": "string"
|
37
|
-
},
|
38
|
-
"projectNameAndRootFormat": {
|
39
|
-
"description": "Whether to generate the project name and root directory as provided (`as-provided`) or generate them composing their values and taking the configured layout into account (`derived`).",
|
40
|
-
"type": "string",
|
41
|
-
"enum": ["as-provided", "derived"]
|
42
|
-
},
|
43
40
|
"style": {
|
44
41
|
"description": "The file extension to be used for style files.",
|
45
42
|
"type": "string",
|
@@ -181,5 +178,5 @@
|
|
181
178
|
}
|
182
179
|
},
|
183
180
|
"additionalProperties": false,
|
184
|
-
"required": ["
|
181
|
+
"required": ["directory"]
|
185
182
|
}
|
@@ -9,8 +9,9 @@ async function addStandaloneComponent(tree, { libraryOptions, componentOptions }
|
|
9
9
|
await (0, component_1.componentGenerator)(tree, {
|
10
10
|
...componentOptions,
|
11
11
|
name: componentOptions.name,
|
12
|
-
|
13
|
-
|
12
|
+
path: (0, devkit_1.joinPathFragments)(libraryOptions.projectRoot, 'src', 'lib', componentOptions.flat
|
13
|
+
? `${componentOptions.name}`
|
14
|
+
: `${componentOptions.name}/${componentOptions.name}`),
|
14
15
|
standalone: true,
|
15
16
|
export: true,
|
16
17
|
skipFormat: true,
|
@@ -22,12 +22,12 @@ async function normalizeOptions(host, schema) {
|
|
22
22
|
skipModule: schema.skipModule || schema.standalone,
|
23
23
|
...schema,
|
24
24
|
};
|
25
|
+
await (0, project_name_and_root_utils_1.ensureProjectName)(host, options, 'library');
|
25
26
|
const { projectName, names: projectNames, projectRoot, importPath, } = await (0, project_name_and_root_utils_1.determineProjectNameAndRootOptions)(host, {
|
26
27
|
name: options.name,
|
27
28
|
projectType: 'library',
|
28
29
|
directory: options.directory,
|
29
30
|
importPath: options.importPath,
|
30
|
-
projectNameAndRootFormat: options.projectNameAndRootFormat,
|
31
31
|
});
|
32
32
|
const fileName = options.simpleName
|
33
33
|
? projectNames.projectSimpleName
|
@@ -2,12 +2,12 @@ import { UnitTestRunner } from '../../../utils/test-runners';
|
|
2
2
|
import type { Linter, LinterType } from '@nx/eslint';
|
3
3
|
export interface NormalizedSchema {
|
4
4
|
libraryOptions: {
|
5
|
-
|
5
|
+
directory: string;
|
6
|
+
name?: string;
|
6
7
|
addTailwind?: boolean;
|
7
8
|
skipFormat?: boolean;
|
8
9
|
simpleName?: boolean;
|
9
10
|
addModuleSpec?: boolean;
|
10
|
-
directory?: string;
|
11
11
|
sourceDir?: string;
|
12
12
|
buildable?: boolean;
|
13
13
|
publishable?: boolean;
|
@@ -1,15 +1,13 @@
|
|
1
|
-
import type { ProjectNameAndRootFormat } from '@nx/devkit/src/generators/project-name-and-root-utils';
|
2
1
|
import type { Linter, LinterType } from '@nx/eslint';
|
3
2
|
import type { UnitTestRunner } from '../../utils/test-runners';
|
4
3
|
|
5
4
|
export interface Schema {
|
6
|
-
|
5
|
+
directory: string;
|
6
|
+
name?: string;
|
7
7
|
addTailwind?: boolean;
|
8
8
|
skipFormat?: boolean;
|
9
9
|
simpleName?: boolean;
|
10
10
|
addModuleSpec?: boolean;
|
11
|
-
directory?: string;
|
12
|
-
projectNameAndRootFormat?: ProjectNameAndRootFormat;
|
13
11
|
sourceDir?: string;
|
14
12
|
buildable?: boolean;
|
15
13
|
publishable?: boolean;
|
@@ -9,22 +9,16 @@
|
|
9
9
|
"name": {
|
10
10
|
"type": "string",
|
11
11
|
"description": "The name of the library.",
|
12
|
-
"
|
13
|
-
"$source": "argv",
|
14
|
-
"index": 0
|
15
|
-
},
|
16
|
-
"x-prompt": "What name would you like to use for the library?",
|
17
|
-
"pattern": "(?:^@[a-zA-Z0-9-*~][a-zA-Z0-9-*._~]*\\/[a-zA-Z0-9-~][a-zA-Z0-9-._~]*|^[a-zA-Z][^:]*)$"
|
12
|
+
"x-priority": "important"
|
18
13
|
},
|
19
14
|
"directory": {
|
20
15
|
"type": "string",
|
21
16
|
"description": "A directory where the library is placed.",
|
22
|
-
"
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
"
|
27
|
-
"enum": ["as-provided", "derived"]
|
17
|
+
"$default": {
|
18
|
+
"$source": "argv",
|
19
|
+
"index": 0
|
20
|
+
},
|
21
|
+
"x-prompt": "Which directory do you want to create the library in?"
|
28
22
|
},
|
29
23
|
"publishable": {
|
30
24
|
"type": "boolean",
|
@@ -203,6 +197,6 @@
|
|
203
197
|
}
|
204
198
|
},
|
205
199
|
"additionalProperties": false,
|
206
|
-
"required": ["
|
200
|
+
"required": ["directory"],
|
207
201
|
"examplesFile": "../../../docs/library-examples.md"
|
208
202
|
}
|
@@ -1,5 +1,3 @@
|
|
1
|
-
import { ProjectNameAndRootFormat } from '@nx/devkit/src/generators/project-name-and-root-utils';
|
2
|
-
|
3
1
|
export interface Schema {
|
4
2
|
projectName: string;
|
5
3
|
destination: string;
|
@@ -7,5 +5,4 @@ export interface Schema {
|
|
7
5
|
importPath?: string;
|
8
6
|
skipFormat?: boolean;
|
9
7
|
newProjectName?: string;
|
10
|
-
projectNameAndRootFormat?: ProjectNameAndRootFormat;
|
11
8
|
}
|
@@ -35,11 +35,6 @@
|
|
35
35
|
},
|
36
36
|
"x-priority": "important"
|
37
37
|
},
|
38
|
-
"projectNameAndRootFormat": {
|
39
|
-
"description": "Whether to generate the new project name and destination as provided (`as-provided`) or generate them composing their values and taking the configured layout into account (`derived`).",
|
40
|
-
"type": "string",
|
41
|
-
"enum": ["as-provided", "derived"]
|
42
|
-
},
|
43
38
|
"importPath": {
|
44
39
|
"type": "string",
|
45
40
|
"description": "The new import path to use in the `tsconfig.base.json`."
|
@@ -6,8 +6,7 @@ const devkit_1 = require("@nx/devkit");
|
|
6
6
|
async function normalizeOptions(tree, options) {
|
7
7
|
const { artifactName: name, directory, fileName, filePath, project: projectName, } = await (0, artifact_name_and_directory_utils_1.determineArtifactNameAndDirectoryOptions)(tree, {
|
8
8
|
name: options.name,
|
9
|
-
|
10
|
-
nameAndDirectoryFormat: options.nameAndDirectoryFormat,
|
9
|
+
path: options.path,
|
11
10
|
suffix: 'pipe',
|
12
11
|
});
|
13
12
|
const { className } = (0, devkit_1.names)(name);
|
@@ -1,9 +1,8 @@
|
|
1
1
|
import { NameAndDirectoryFormat } from '@nx/devkit/src/generators/artifact-name-and-directory-utils';
|
2
2
|
|
3
3
|
export interface Schema {
|
4
|
-
|
5
|
-
|
6
|
-
nameAndDirectoryFormat?: NameAndDirectoryFormat;
|
4
|
+
path: string;
|
5
|
+
name?: string;
|
7
6
|
skipTests?: boolean;
|
8
7
|
skipImport?: boolean;
|
9
8
|
standalone?: boolean;
|
@@ -7,34 +7,19 @@
|
|
7
7
|
"additionalProperties": false,
|
8
8
|
"description": "Creates an Angular pipe.",
|
9
9
|
"properties": {
|
10
|
-
"
|
10
|
+
"path": {
|
11
11
|
"type": "string",
|
12
|
-
"description": "The
|
12
|
+
"description": "The path at which to create the pipe file, relative to the workspace root.",
|
13
13
|
"$default": {
|
14
14
|
"$source": "argv",
|
15
15
|
"index": 0
|
16
16
|
},
|
17
|
-
"x-prompt": "What
|
18
|
-
},
|
19
|
-
"directory": {
|
20
|
-
"type": "string",
|
21
|
-
"description": "The directory at which to create the pipe file. When `--nameAndDirectoryFormat=as-provided`, it will be relative to the current working directory. Otherwise, it will be relative to the workspace root.",
|
22
|
-
"aliases": ["dir", "path"],
|
23
|
-
"x-priority": "important"
|
24
|
-
},
|
25
|
-
"nameAndDirectoryFormat": {
|
26
|
-
"description": "Whether to generate the pipe in the directory as provided, relative to the current working directory and ignoring the project (`as-provided`) or generate it using the project and directory relative to the workspace root (`derived`).",
|
27
|
-
"type": "string",
|
28
|
-
"enum": ["as-provided", "derived"]
|
17
|
+
"x-prompt": "What is the path of the new pipe?"
|
29
18
|
},
|
30
|
-
"
|
19
|
+
"name": {
|
31
20
|
"type": "string",
|
32
|
-
"description": "The name of the
|
33
|
-
"
|
34
|
-
"$source": "projectName"
|
35
|
-
},
|
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 v20."
|
21
|
+
"description": "The name of the pipe.",
|
22
|
+
"x-prompt": "What name would you like to use for the pipe?"
|
38
23
|
},
|
39
24
|
"skipTests": {
|
40
25
|
"type": "boolean",
|
@@ -67,5 +52,5 @@
|
|
67
52
|
"description": "Skip formatting of files."
|
68
53
|
}
|
69
54
|
},
|
70
|
-
"required": ["
|
55
|
+
"required": ["path"]
|
71
56
|
}
|
@@ -16,13 +16,12 @@ async function remote(tree, schema) {
|
|
16
16
|
if (options.host && !projects.has(options.host)) {
|
17
17
|
throw new Error(`The name of the application to be used as the host app does not exist. (${options.host})`);
|
18
18
|
}
|
19
|
-
|
19
|
+
await (0, project_name_and_root_utils_1.ensureProjectName)(tree, options, 'application');
|
20
|
+
const { projectName: remoteProjectName } = await (0, project_name_and_root_utils_1.determineProjectNameAndRootOptions)(tree, {
|
20
21
|
name: options.name,
|
21
22
|
projectType: 'application',
|
22
23
|
directory: options.directory,
|
23
|
-
projectNameAndRootFormat: options.projectNameAndRootFormat,
|
24
24
|
});
|
25
|
-
options.projectNameAndRootFormat = projectNameAndRootFormat;
|
26
25
|
const port = options.port ?? (0, lib_1.findNextAvailablePort)(tree);
|
27
26
|
const appInstallTask = await (0, application_1.applicationGenerator)(tree, {
|
28
27
|
...options,
|
@@ -1,10 +1,10 @@
|
|
1
|
-
import type { ProjectNameAndRootFormat } from '@nx/devkit/src/generators/project-name-and-root-utils';
|
2
1
|
import type { Linter, LinterType } from '@nx/eslint';
|
3
2
|
import type { E2eTestRunner, UnitTestRunner } from '../../utils/test-runners';
|
4
3
|
import type { Styles } from '../utils/types';
|
5
4
|
|
6
5
|
export interface Schema {
|
7
|
-
|
6
|
+
directory: string;
|
7
|
+
name?: string;
|
8
8
|
host?: string;
|
9
9
|
port?: number;
|
10
10
|
setParserOptionsProject?: boolean;
|
@@ -13,8 +13,6 @@ export interface Schema {
|
|
13
13
|
prefix?: string;
|
14
14
|
style?: Styles;
|
15
15
|
skipTests?: boolean;
|
16
|
-
directory?: string;
|
17
|
-
projectNameAndRootFormat?: ProjectNameAndRootFormat;
|
18
16
|
tags?: string;
|
19
17
|
linter?: Linter | LinterType;
|
20
18
|
unitTestRunner?: UnitTestRunner;
|
@@ -12,14 +12,20 @@
|
|
12
12
|
}
|
13
13
|
],
|
14
14
|
"properties": {
|
15
|
-
"
|
15
|
+
"directory": {
|
16
|
+
"description": "The directory of the new application.",
|
16
17
|
"type": "string",
|
17
|
-
"description": "The name to give to the remote Angular app.",
|
18
18
|
"$default": {
|
19
19
|
"$source": "argv",
|
20
20
|
"index": 0
|
21
21
|
},
|
22
|
-
"
|
22
|
+
"x-prompt": "Which directory do you want to create the application in?"
|
23
|
+
},
|
24
|
+
"name": {
|
25
|
+
"type": "string",
|
26
|
+
"description": "The name to give to the remote Angular app.",
|
27
|
+
"pattern": "^[a-zA-Z][^:]*$",
|
28
|
+
"x-priority": "important"
|
23
29
|
},
|
24
30
|
"host": {
|
25
31
|
"type": "string",
|
@@ -31,15 +37,6 @@
|
|
31
37
|
"type": "number",
|
32
38
|
"description": "The port on which this app should be served."
|
33
39
|
},
|
34
|
-
"directory": {
|
35
|
-
"description": "The directory of the new application.",
|
36
|
-
"type": "string"
|
37
|
-
},
|
38
|
-
"projectNameAndRootFormat": {
|
39
|
-
"description": "Whether to generate the project name and root directory as provided (`as-provided`) or generate them composing their values and taking the configured layout into account (`derived`).",
|
40
|
-
"type": "string",
|
41
|
-
"enum": ["as-provided", "derived"]
|
42
|
-
},
|
43
40
|
"style": {
|
44
41
|
"description": "The file extension to be used for style files.",
|
45
42
|
"type": "string",
|
@@ -174,5 +171,5 @@
|
|
174
171
|
}
|
175
172
|
},
|
176
173
|
"additionalProperties": false,
|
177
|
-
"required": ["
|
174
|
+
"required": ["directory"]
|
178
175
|
}
|
@@ -7,8 +7,7 @@ async function normalizeOptions(tree, options) {
|
|
7
7
|
options.type ??= 'component';
|
8
8
|
const { artifactName: name, directory, fileName, filePath, project: projectName, } = await (0, artifact_name_and_directory_utils_1.determineArtifactNameAndDirectoryOptions)(tree, {
|
9
9
|
name: options.name,
|
10
|
-
|
11
|
-
nameAndDirectoryFormat: options.nameAndDirectoryFormat,
|
10
|
+
path: options.path,
|
12
11
|
suffix: options.type ?? 'component',
|
13
12
|
});
|
14
13
|
const { className } = (0, devkit_1.names)(name);
|
@@ -13,8 +13,6 @@ async function scamGenerator(tree, rawOptions) {
|
|
13
13
|
export: false,
|
14
14
|
standalone: false,
|
15
15
|
skipFormat: true,
|
16
|
-
// options are already normalize, use them as is
|
17
|
-
nameAndDirectoryFormat: 'as-provided',
|
18
16
|
});
|
19
17
|
(0, lib_1.convertComponentToScam)(tree, options);
|
20
18
|
(0, export_scam_1.exportScam)(tree, options);
|
@@ -1,9 +1,8 @@
|
|
1
1
|
import { NameAndDirectoryFormat } from '@nx/devkit/src/generators/artifact-name-and-directory-utils';
|
2
2
|
|
3
3
|
export interface Schema {
|
4
|
-
|
5
|
-
|
6
|
-
nameAndDirectoryFormat?: NameAndDirectoryFormat;
|
4
|
+
path: string;
|
5
|
+
name?: string;
|
7
6
|
displayBlock?: boolean;
|
8
7
|
inlineStyle?: boolean;
|
9
8
|
inlineTemplate?: boolean;
|
@@ -21,6 +20,7 @@ export interface Schema {
|
|
21
20
|
}
|
22
21
|
|
23
22
|
export interface NormalizedSchema extends Schema {
|
23
|
+
name: string;
|
24
24
|
directory: string;
|
25
25
|
projectName: string;
|
26
26
|
fileName: string;
|
@@ -6,41 +6,26 @@
|
|
6
6
|
"type": "object",
|
7
7
|
"examples": [
|
8
8
|
{
|
9
|
-
"command": "nx g @nx/angular:scam my-
|
9
|
+
"command": "nx g @nx/angular:scam my-lib/src/lib/my-sample/my-sample",
|
10
10
|
"description": "Generate a `MySampleComponent` component in the `my-lib` library."
|
11
11
|
}
|
12
12
|
],
|
13
13
|
"description": "Creates a new Angular SCAM.",
|
14
14
|
"additionalProperties": false,
|
15
15
|
"properties": {
|
16
|
-
"
|
16
|
+
"path": {
|
17
17
|
"type": "string",
|
18
|
-
"description": "The
|
18
|
+
"description": "The path at which to create the SCAM file, relative to the workspace root.",
|
19
19
|
"$default": {
|
20
20
|
"$source": "argv",
|
21
21
|
"index": 0
|
22
22
|
},
|
23
|
-
"x-prompt": "What
|
23
|
+
"x-prompt": "What is the path of the new SCAM?"
|
24
24
|
},
|
25
|
-
"
|
26
|
-
"type": "string",
|
27
|
-
"description": "The directory at which to create the SCAM files. When `--nameAndDirectoryFormat=as-provided`, it will be relative to the current working directory. Otherwise, it will be relative to the workspace root.",
|
28
|
-
"aliases": ["dir", "path"],
|
29
|
-
"x-priority": "important"
|
30
|
-
},
|
31
|
-
"nameAndDirectoryFormat": {
|
32
|
-
"description": "Whether to generate the SCAM in the directory as provided, relative to the current working directory and ignoring the project (`as-provided`) or generate it using the project and directory relative to the workspace root (`derived`).",
|
33
|
-
"type": "string",
|
34
|
-
"enum": ["as-provided", "derived"]
|
35
|
-
},
|
36
|
-
"project": {
|
25
|
+
"name": {
|
37
26
|
"type": "string",
|
38
|
-
"description": "The name of the
|
39
|
-
"
|
40
|
-
"$source": "projectName"
|
41
|
-
},
|
42
|
-
"x-dropdown": "projects",
|
43
|
-
"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 v20."
|
27
|
+
"description": "The name of the component.",
|
28
|
+
"x-prompt": "What name would you like to use for the component?"
|
44
29
|
},
|
45
30
|
"displayBlock": {
|
46
31
|
"description": "Specifies if the style will contain `:host { display: block; }`.",
|
@@ -132,5 +117,5 @@
|
|
132
117
|
"x-priority": "internal"
|
133
118
|
}
|
134
119
|
},
|
135
|
-
"required": ["
|
120
|
+
"required": ["path"]
|
136
121
|
}
|
@@ -6,8 +6,7 @@ const devkit_1 = require("@nx/devkit");
|
|
6
6
|
async function normalizeOptions(tree, options) {
|
7
7
|
const { artifactName: name, directory, fileName, filePath, project: projectName, } = await (0, artifact_name_and_directory_utils_1.determineArtifactNameAndDirectoryOptions)(tree, {
|
8
8
|
name: options.name,
|
9
|
-
|
10
|
-
nameAndDirectoryFormat: options.nameAndDirectoryFormat,
|
9
|
+
path: options.path,
|
11
10
|
suffix: 'directive',
|
12
11
|
});
|
13
12
|
const { className } = (0, devkit_1.names)(name);
|
@@ -13,8 +13,6 @@ async function scamDirectiveGenerator(tree, rawOptions) {
|
|
13
13
|
export: false,
|
14
14
|
standalone: false,
|
15
15
|
skipFormat: true,
|
16
|
-
// options are already normalize, use them as is
|
17
|
-
nameAndDirectoryFormat: 'as-provided',
|
18
16
|
});
|
19
17
|
(0, lib_1.convertDirectiveToScam)(tree, options);
|
20
18
|
(0, export_scam_1.exportScam)(tree, options);
|
@@ -1,9 +1,8 @@
|
|
1
1
|
import { NameAndDirectoryFormat } from '@nx/devkit/src/generators/artifact-name-and-directory-utils';
|
2
2
|
|
3
3
|
export interface Schema {
|
4
|
-
|
5
|
-
|
6
|
-
nameAndDirectoryFormat?: NameAndDirectoryFormat;
|
4
|
+
path: string;
|
5
|
+
name?: string;
|
7
6
|
skipTests?: boolean;
|
8
7
|
inlineScam?: boolean;
|
9
8
|
prefix?: string;
|
@@ -13,6 +12,7 @@ export interface Schema {
|
|
13
12
|
}
|
14
13
|
|
15
14
|
export interface NormalizedSchema extends Schema {
|
15
|
+
name: string;
|
16
16
|
directory: string;
|
17
17
|
export: boolean;
|
18
18
|
fileName: string;
|
@@ -13,13 +13,18 @@
|
|
13
13
|
"description": "Creates a new, generic Angular directive definition in the given or default project.",
|
14
14
|
"additionalProperties": false,
|
15
15
|
"properties": {
|
16
|
-
"
|
16
|
+
"path": {
|
17
17
|
"type": "string",
|
18
|
-
"description": "The
|
18
|
+
"description": "The path at which to create the SCAM Directive files, relative to the workspace root.",
|
19
19
|
"$default": {
|
20
20
|
"$source": "argv",
|
21
21
|
"index": 0
|
22
22
|
},
|
23
|
+
"x-prompt": "What is the path of the new directive?"
|
24
|
+
},
|
25
|
+
"name": {
|
26
|
+
"type": "string",
|
27
|
+
"description": "The name of the directive.",
|
23
28
|
"x-prompt": "What name would you like to use for the directive?",
|
24
29
|
"x-priority": "important"
|
25
30
|
},
|
@@ -92,5 +97,5 @@
|
|
92
97
|
"x-priority": "internal"
|
93
98
|
}
|
94
99
|
},
|
95
|
-
"required": ["
|
100
|
+
"required": ["path"]
|
96
101
|
}
|
@@ -6,8 +6,7 @@ const devkit_1 = require("@nx/devkit");
|
|
6
6
|
async function normalizeOptions(tree, options) {
|
7
7
|
const { artifactName: name, directory, fileName, filePath, project: projectName, } = await (0, artifact_name_and_directory_utils_1.determineArtifactNameAndDirectoryOptions)(tree, {
|
8
8
|
name: options.name,
|
9
|
-
|
10
|
-
nameAndDirectoryFormat: options.nameAndDirectoryFormat,
|
9
|
+
path: options.path,
|
11
10
|
suffix: 'pipe',
|
12
11
|
});
|
13
12
|
const { className } = (0, devkit_1.names)(name);
|
@@ -13,8 +13,6 @@ async function scamPipeGenerator(tree, rawOptions) {
|
|
13
13
|
export: false,
|
14
14
|
standalone: false,
|
15
15
|
skipFormat: true,
|
16
|
-
// options are already normalize, use them as is
|
17
|
-
nameAndDirectoryFormat: 'as-provided',
|
18
16
|
});
|
19
17
|
(0, lib_1.convertPipeToScam)(tree, options);
|
20
18
|
(0, export_scam_1.exportScam)(tree, options);
|
@@ -1,9 +1,8 @@
|
|
1
1
|
import { NameAndDirectoryFormat } from '@nx/devkit/src/generators/artifact-name-and-directory-utils';
|
2
2
|
|
3
3
|
export interface Schema {
|
4
|
-
|
5
|
-
|
6
|
-
nameAndDirectoryFormat?: NameAndDirectoryFormat;
|
4
|
+
path: string;
|
5
|
+
name?: string;
|
7
6
|
skipTests?: boolean;
|
8
7
|
inlineScam?: boolean;
|
9
8
|
export?: boolean;
|
@@ -11,6 +10,7 @@ export interface Schema {
|
|
11
10
|
}
|
12
11
|
|
13
12
|
export interface NormalizedSchema extends Schema {
|
13
|
+
name: string;
|
14
14
|
directory: string;
|
15
15
|
export: boolean;
|
16
16
|
fileName: string;
|
@@ -6,43 +6,28 @@
|
|
6
6
|
"type": "object",
|
7
7
|
"examples": [
|
8
8
|
{
|
9
|
-
"command": "nx g @nx/angular:scam-pipe
|
9
|
+
"command": "nx g @nx/angular:scam-pipe mylib/src/lib/my-transformation/my-transformation",
|
10
10
|
"description": "Generates a `MyTransformationPipe` in a `my-transformation` folder in the `my-lib` project"
|
11
11
|
}
|
12
12
|
],
|
13
13
|
"description": "Creates a new, generic Angular pipe definition in the given or default project.",
|
14
14
|
"additionalProperties": false,
|
15
15
|
"properties": {
|
16
|
-
"
|
16
|
+
"path": {
|
17
17
|
"type": "string",
|
18
|
-
"description": "The
|
18
|
+
"description": "The path at which to create the pipe file, relative to the workspace root.",
|
19
19
|
"$default": {
|
20
20
|
"$source": "argv",
|
21
21
|
"index": 0
|
22
22
|
},
|
23
|
-
"x-prompt": "What
|
24
|
-
"x-priority": "important"
|
23
|
+
"x-prompt": "What is the path of the new pipe?"
|
25
24
|
},
|
26
|
-
"
|
25
|
+
"name": {
|
27
26
|
"type": "string",
|
28
|
-
"description": "The
|
29
|
-
"
|
27
|
+
"description": "The name of the pipe.",
|
28
|
+
"x-prompt": "What name would you like to use for the pipe?",
|
30
29
|
"x-priority": "important"
|
31
30
|
},
|
32
|
-
"nameAndDirectoryFormat": {
|
33
|
-
"description": "Whether to generate the component in the directory as provided, relative to the current working directory and ignoring the project (`as-provided`) or generate it using the project and directory relative to the workspace root (`derived`).",
|
34
|
-
"type": "string",
|
35
|
-
"enum": ["as-provided", "derived"]
|
36
|
-
},
|
37
|
-
"project": {
|
38
|
-
"type": "string",
|
39
|
-
"description": "The name of the project.",
|
40
|
-
"$default": {
|
41
|
-
"$source": "projectName"
|
42
|
-
},
|
43
|
-
"x-dropdown": "projects",
|
44
|
-
"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 v20."
|
45
|
-
},
|
46
31
|
"skipTests": {
|
47
32
|
"type": "boolean",
|
48
33
|
"description": "Do not create `spec.ts` test files for the new pipe.",
|
@@ -73,5 +58,5 @@
|
|
73
58
|
"x-priority": "internal"
|
74
59
|
}
|
75
60
|
},
|
76
|
-
"required": ["
|
61
|
+
"required": ["path"]
|
77
62
|
}
|
@@ -17,22 +17,20 @@ const remote_1 = require("../remote/remote");
|
|
17
17
|
async function generateTestApplication(tree, options) {
|
18
18
|
tree.write('.gitignore', '');
|
19
19
|
await (0, application_1.applicationGenerator)(tree, {
|
20
|
-
projectNameAndRootFormat: 'as-provided',
|
21
20
|
...options,
|
22
21
|
});
|
23
22
|
}
|
24
23
|
async function generateTestHostApplication(tree, options) {
|
25
24
|
tree.write('.gitignore', '');
|
26
|
-
await (0, host_1.host)(tree, {
|
25
|
+
await (0, host_1.host)(tree, { ...options });
|
27
26
|
}
|
28
27
|
async function generateTestRemoteApplication(tree, options) {
|
29
28
|
tree.write('.gitignore', '');
|
30
|
-
await (0, remote_1.remote)(tree, {
|
29
|
+
await (0, remote_1.remote)(tree, { ...options });
|
31
30
|
}
|
32
31
|
async function generateTestLibrary(tree, options) {
|
33
32
|
tree.write('.gitignore', '');
|
34
33
|
await (0, library_1.libraryGenerator)(tree, {
|
35
|
-
projectNameAndRootFormat: 'as-provided',
|
36
34
|
...options,
|
37
35
|
});
|
38
36
|
}
|
@@ -40,19 +38,18 @@ async function createStorybookTestWorkspaceForLib(libName) {
|
|
40
38
|
let tree = (0, testing_1.createTreeWithEmptyWorkspace)({ layout: 'apps-libs' });
|
41
39
|
tree.write('.gitignore', '');
|
42
40
|
await (0, library_1.libraryGenerator)(tree, {
|
43
|
-
|
41
|
+
directory: libName,
|
44
42
|
buildable: false,
|
45
43
|
linter: eslint_1.Linter.EsLint,
|
46
44
|
publishable: false,
|
47
45
|
simpleName: false,
|
48
46
|
skipFormat: true,
|
49
47
|
unitTestRunner: test_runners_1.UnitTestRunner.Jest,
|
50
|
-
projectNameAndRootFormat: 'as-provided',
|
51
48
|
standalone: false,
|
52
49
|
});
|
53
50
|
await (0, component_1.componentGenerator)(tree, {
|
54
51
|
name: 'test-button',
|
55
|
-
|
52
|
+
path: `${libName}/src/lib/test-button/test-button`,
|
56
53
|
standalone: false,
|
57
54
|
skipFormat: true,
|
58
55
|
});
|
@@ -82,7 +79,7 @@ export class TestButtonComponent {
|
|
82
79
|
});
|
83
80
|
await (0, component_1.componentGenerator)(tree, {
|
84
81
|
name: 'barrel-button',
|
85
|
-
|
82
|
+
path: `${libName}/src/lib/barrel/barrel-button/barrel-button`,
|
86
83
|
module: 'barrel',
|
87
84
|
standalone: false,
|
88
85
|
skipFormat: true,
|
@@ -104,14 +101,14 @@ export class BarrelModule {}`);
|
|
104
101
|
});
|
105
102
|
await (0, component_1.componentGenerator)(tree, {
|
106
103
|
name: 'variable-declare-button',
|
107
|
-
|
104
|
+
path: `${libName}/src/lib/variable-declare/variable-declare-button/variable-declare-button`,
|
108
105
|
module: 'variable-declare',
|
109
106
|
standalone: false,
|
110
107
|
skipFormat: true,
|
111
108
|
});
|
112
109
|
await (0, component_1.componentGenerator)(tree, {
|
113
110
|
name: 'variable-declare-view',
|
114
|
-
|
111
|
+
path: `${libName}/src/lib/variable-declare/variable-declare-view/variable-declare-view`,
|
115
112
|
module: 'variable-declare',
|
116
113
|
standalone: false,
|
117
114
|
skipFormat: true,
|
@@ -139,21 +136,21 @@ export class VariableDeclareModule {}`);
|
|
139
136
|
});
|
140
137
|
await (0, component_1.componentGenerator)(tree, {
|
141
138
|
name: 'variable-spread-declare-button',
|
142
|
-
|
139
|
+
path: `${libName}/src/lib/variable-spread-declare/variable-spread-declare-button/variable-spread-declare-button`,
|
143
140
|
module: 'variable-spread-declare',
|
144
141
|
standalone: false,
|
145
142
|
skipFormat: true,
|
146
143
|
});
|
147
144
|
await (0, component_1.componentGenerator)(tree, {
|
148
145
|
name: 'variable-spread-declare-view',
|
149
|
-
|
146
|
+
path: `${libName}/src/lib/variable-spread-declare/variable-spread-declare-view/variable-spread-declare-view`,
|
150
147
|
module: 'variable-spread-declare',
|
151
148
|
standalone: false,
|
152
149
|
skipFormat: true,
|
153
150
|
});
|
154
151
|
await (0, component_1.componentGenerator)(tree, {
|
155
152
|
name: 'variable-spread-declare-anotherview',
|
156
|
-
|
153
|
+
path: `${libName}/src/lib/variable-spread-declare/variable-spread-declare-anotherview/variable-spread-declare-anotherview`,
|
157
154
|
module: 'variable-spread-declare',
|
158
155
|
standalone: false,
|
159
156
|
skipFormat: true,
|
@@ -181,14 +178,14 @@ export class VariableSpreadDeclareModule {}`);
|
|
181
178
|
});
|
182
179
|
await (0, component_1.componentGenerator)(tree, {
|
183
180
|
name: 'cmp1',
|
184
|
-
|
181
|
+
path: `${libName}/src/lib/static-member-declarations/cmp1/cmp1`,
|
185
182
|
module: 'static-member-declarations',
|
186
183
|
standalone: false,
|
187
184
|
skipFormat: true,
|
188
185
|
});
|
189
186
|
await (0, component_1.componentGenerator)(tree, {
|
190
187
|
name: 'cmp2',
|
191
|
-
|
188
|
+
path: `${libName}/src/lib/static-member-declarations/cmp2/cmp2`,
|
192
189
|
module: 'static-member-declarations',
|
193
190
|
standalone: false,
|
194
191
|
skipFormat: true,
|
@@ -215,13 +212,13 @@ export class StaticMemberDeclarationsModule {
|
|
215
212
|
await (0, component_1.componentGenerator)(tree, {
|
216
213
|
name: 'nested-button',
|
217
214
|
module: 'nested',
|
218
|
-
|
215
|
+
path: `${libName}/src/lib/nested/nested-button/nested-button`,
|
219
216
|
standalone: false,
|
220
217
|
skipFormat: true,
|
221
218
|
});
|
222
219
|
await (0, component_1.componentGenerator)(tree, {
|
223
220
|
name: 'test-other',
|
224
|
-
|
221
|
+
path: `${libName}/src/lib/test-other/test-other`,
|
225
222
|
standalone: false,
|
226
223
|
skipFormat: true,
|
227
224
|
});
|
package/src/utils/versions.d.ts
CHANGED
@@ -13,7 +13,7 @@ export declare const expressVersion = "~4.18.2";
|
|
13
13
|
export declare const typesExpressVersion = "4.17.14";
|
14
14
|
export declare const browserSyncVersion = "^3.0.0";
|
15
15
|
export declare const moduleFederationNodeVersion = "~2.5.0";
|
16
|
-
export declare const moduleFederationEnhancedVersion = "
|
16
|
+
export declare const moduleFederationEnhancedVersion = "0.6.6";
|
17
17
|
export declare const angularEslintVersion = "^18.3.0";
|
18
18
|
export declare const typescriptEslintVersion = "^7.16.0";
|
19
19
|
export declare const tailwindVersion = "^3.0.2";
|
package/src/utils/versions.js
CHANGED
@@ -16,7 +16,7 @@ exports.expressVersion = '~4.18.2';
|
|
16
16
|
exports.typesExpressVersion = '4.17.14';
|
17
17
|
exports.browserSyncVersion = '^3.0.0';
|
18
18
|
exports.moduleFederationNodeVersion = '~2.5.0';
|
19
|
-
exports.moduleFederationEnhancedVersion = '
|
19
|
+
exports.moduleFederationEnhancedVersion = '0.6.6';
|
20
20
|
exports.angularEslintVersion = '^18.3.0';
|
21
21
|
exports.typescriptEslintVersion = '^7.16.0';
|
22
22
|
exports.tailwindVersion = '^3.0.2';
|