@nx/react 17.0.0-rc.2 → 17.0.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/react",
|
|
3
|
-
"version": "17.0.0
|
|
3
|
+
"version": "17.0.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "The React plugin for Nx contains executors and generators for managing React applications and libraries within an Nx workspace. It provides:\n\n\n- Integration with libraries such as Jest, Cypress, and Storybook.\n\n- Generators for applications, libraries, components, hooks, and more.\n\n- Library build support for publishing packages to npm or other registries.\n\n- Utilities for automatic workspace refactoring.",
|
|
6
6
|
"repository": {
|
|
@@ -37,11 +37,11 @@
|
|
|
37
37
|
"file-loader": "^6.2.0",
|
|
38
38
|
"minimatch": "3.0.5",
|
|
39
39
|
"tslib": "^2.3.0",
|
|
40
|
-
"@nx/devkit": "17.0.0
|
|
41
|
-
"@nx/js": "17.0.0
|
|
42
|
-
"@nx/eslint": "17.0.0
|
|
43
|
-
"@nx/web": "17.0.0
|
|
44
|
-
"@nrwl/react": "17.0.0
|
|
40
|
+
"@nx/devkit": "17.0.0",
|
|
41
|
+
"@nx/js": "17.0.0",
|
|
42
|
+
"@nx/eslint": "17.0.0",
|
|
43
|
+
"@nx/web": "17.0.0",
|
|
44
|
+
"@nrwl/react": "17.0.0"
|
|
45
45
|
},
|
|
46
46
|
"publishConfig": {
|
|
47
47
|
"access": "public"
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.libraryGeneratorInternal = exports.libraryGenerator = void 0;
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
|
+
const artifact_name_and_directory_utils_1 = require("@nx/devkit/src/generators/artifact-name-and-directory-utils");
|
|
5
6
|
const js_1 = require("@nx/js");
|
|
6
7
|
const versions_1 = require("../../utils/versions");
|
|
7
8
|
const component_1 = require("../component/component");
|
|
@@ -15,6 +16,7 @@ const create_files_1 = require("./lib/create-files");
|
|
|
15
16
|
const create_ts_config_1 = require("../../utils/create-ts-config");
|
|
16
17
|
const install_common_dependencies_1 = require("./lib/install-common-dependencies");
|
|
17
18
|
const set_defaults_1 = require("./lib/set-defaults");
|
|
19
|
+
const path_1 = require("path");
|
|
18
20
|
async function libraryGenerator(host, schema) {
|
|
19
21
|
return await libraryGeneratorInternal(host, {
|
|
20
22
|
projectNameAndRootFormat: 'derived',
|
|
@@ -132,9 +134,11 @@ async function libraryGeneratorInternal(host, schema) {
|
|
|
132
134
|
}, true);
|
|
133
135
|
}
|
|
134
136
|
if (options.component) {
|
|
137
|
+
const relativeCwd = (0, artifact_name_and_directory_utils_1.getRelativeCwd)();
|
|
138
|
+
const name = (0, devkit_1.joinPathFragments)(options.projectRoot, 'src/lib', options.fileName);
|
|
135
139
|
const componentTask = await (0, component_1.default)(host, {
|
|
136
140
|
nameAndDirectoryFormat: 'as-provided',
|
|
137
|
-
name: (0,
|
|
141
|
+
name: relativeCwd ? (0, path_1.relative)(relativeCwd, name) : name,
|
|
138
142
|
project: options.name,
|
|
139
143
|
flat: true,
|
|
140
144
|
style: options.style,
|