@nx/react 16.8.0-beta.2 → 16.8.0-beta.3
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": "16.8.0-beta.
|
|
3
|
+
"version": "16.8.0-beta.3",
|
|
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": {
|
|
@@ -31,11 +31,11 @@
|
|
|
31
31
|
"migrations": "./migrations.json"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@nrwl/react": "16.8.0-beta.
|
|
35
|
-
"@nx/devkit": "16.8.0-beta.
|
|
36
|
-
"@nx/js": "16.8.0-beta.
|
|
37
|
-
"@nx/linter": "16.8.0-beta.
|
|
38
|
-
"@nx/web": "16.8.0-beta.
|
|
34
|
+
"@nrwl/react": "16.8.0-beta.3",
|
|
35
|
+
"@nx/devkit": "16.8.0-beta.3",
|
|
36
|
+
"@nx/js": "16.8.0-beta.3",
|
|
37
|
+
"@nx/linter": "16.8.0-beta.3",
|
|
38
|
+
"@nx/web": "16.8.0-beta.3",
|
|
39
39
|
"@phenomnomnominal/tsquery": "~5.0.1",
|
|
40
40
|
"@svgr/webpack": "^8.0.1",
|
|
41
41
|
"chalk": "^4.1.0",
|
|
@@ -47,5 +47,5 @@
|
|
|
47
47
|
"access": "public"
|
|
48
48
|
},
|
|
49
49
|
"type": "commonjs",
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "dcd48165a485bc8db57a1fb02b96a0772de3b7e9"
|
|
51
51
|
}
|
|
@@ -10,6 +10,7 @@ const get_in_source_vitest_tests_template_1 = require("../../utils/get-in-source
|
|
|
10
10
|
const versions_1 = require("../../utils/versions");
|
|
11
11
|
const get_component_tests_1 = require("./get-component-tests");
|
|
12
12
|
const ensure_typescript_1 = require("@nx/js/src/utils/typescript/ensure-typescript");
|
|
13
|
+
const path_1 = require("path");
|
|
13
14
|
function componentGenerator(host, schema) {
|
|
14
15
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
15
16
|
const options = yield normalizeOptions(host, schema);
|
|
@@ -32,7 +33,7 @@ exports.componentGenerator = componentGenerator;
|
|
|
32
33
|
function createComponentFiles(host, options) {
|
|
33
34
|
const componentDir = (0, devkit_1.joinPathFragments)(options.projectSourceRoot, options.directory);
|
|
34
35
|
const componentTests = (0, get_component_tests_1.getComponentTests)(options);
|
|
35
|
-
(0, devkit_1.generateFiles)(host, (0,
|
|
36
|
+
(0, devkit_1.generateFiles)(host, (0, path_1.join)(__dirname, './files'), componentDir, Object.assign(Object.assign({}, options), { componentTests, inSourceVitestTests: (0, get_in_source_vitest_tests_template_1.getInSourceVitestTestsTemplate)(componentTests), tmpl: '' }));
|
|
36
37
|
for (const c of host.listChanges()) {
|
|
37
38
|
let deleteFile = false;
|
|
38
39
|
if ((options.skipTests || options.inSourceTests) &&
|
|
@@ -66,7 +66,7 @@ function generateSpecsForComponents(tree, filePath) {
|
|
|
66
66
|
}, [])
|
|
67
67
|
.join(', ');
|
|
68
68
|
const namedImportStatement = namedImports.length > 0 ? `, { ${namedImports} }` : '';
|
|
69
|
-
(0, devkit_1.generateFiles)(tree, (0,
|
|
69
|
+
(0, devkit_1.generateFiles)(tree, (0, path_1.join)(__dirname, 'files'), componentDir, {
|
|
70
70
|
fileName,
|
|
71
71
|
components,
|
|
72
72
|
importStatement: defaultExport
|
|
@@ -6,6 +6,7 @@ const tslib_1 = require("tslib");
|
|
|
6
6
|
const devkit_1 = require("@nx/devkit");
|
|
7
7
|
const ast_utils_1 = require("../../utils/ast-utils");
|
|
8
8
|
const ensure_typescript_1 = require("@nx/js/src/utils/typescript/ensure-typescript");
|
|
9
|
+
const path_1 = require("path");
|
|
9
10
|
function hookGenerator(host, schema) {
|
|
10
11
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
11
12
|
const options = yield normalizeOptions(host, schema);
|
|
@@ -17,7 +18,7 @@ function hookGenerator(host, schema) {
|
|
|
17
18
|
exports.hookGenerator = hookGenerator;
|
|
18
19
|
function createFiles(host, options) {
|
|
19
20
|
const hookDir = (0, devkit_1.joinPathFragments)(options.projectSourceRoot, options.directory);
|
|
20
|
-
(0, devkit_1.generateFiles)(host, (0,
|
|
21
|
+
(0, devkit_1.generateFiles)(host, (0, path_1.join)(__dirname, './files'), hookDir, Object.assign(Object.assign({}, options), { tmpl: '' }));
|
|
21
22
|
for (const c of host.listChanges()) {
|
|
22
23
|
let deleteFile = false;
|
|
23
24
|
if (options.skipTests && /.*spec.ts/.test(c.path)) {
|
|
@@ -7,6 +7,7 @@ const init_1 = require("../init/init");
|
|
|
7
7
|
const versions_1 = require("../../utils/versions");
|
|
8
8
|
const ast_utils_1 = require("../../utils/ast-utils");
|
|
9
9
|
const ensure_typescript_1 = require("@nx/js/src/utils/typescript/ensure-typescript");
|
|
10
|
+
const path_1 = require("path");
|
|
10
11
|
let tsModule;
|
|
11
12
|
function readEntryFile(host, path) {
|
|
12
13
|
if (!tsModule) {
|
|
@@ -126,7 +127,7 @@ function setupSsrGenerator(tree, options) {
|
|
|
126
127
|
'server',
|
|
127
128
|
];
|
|
128
129
|
}
|
|
129
|
-
(0, devkit_1.generateFiles)(tree, (0,
|
|
130
|
+
(0, devkit_1.generateFiles)(tree, (0, path_1.join)(__dirname, 'files'), projectRoot, {
|
|
130
131
|
tmpl: '',
|
|
131
132
|
extraInclude: ((_e = options.extraInclude) === null || _e === void 0 ? void 0 : _e.length) > 0
|
|
132
133
|
? `"${options.extraInclude.join('", "')}",`
|
|
@@ -6,6 +6,7 @@ const devkit_1 = require("@nx/devkit");
|
|
|
6
6
|
const versions_1 = require("../../utils/versions");
|
|
7
7
|
const add_tailwind_style_imports_1 = require("./lib/add-tailwind-style-imports");
|
|
8
8
|
const update_project_1 = require("./lib/update-project");
|
|
9
|
+
const path_1 = require("path");
|
|
9
10
|
function setupTailwindGenerator(tree, options) {
|
|
10
11
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
11
12
|
const tasks = [];
|
|
@@ -15,7 +16,7 @@ function setupTailwindGenerator(tree, options) {
|
|
|
15
16
|
devkit_1.logger.info(`Skipping setup since there are existing PostCSS or Tailwind configuration files. For manual setup instructions, see https://nx.dev/guides/using-tailwind-css-in-react.`);
|
|
16
17
|
return;
|
|
17
18
|
}
|
|
18
|
-
(0, devkit_1.generateFiles)(tree, (0,
|
|
19
|
+
(0, devkit_1.generateFiles)(tree, (0, path_1.join)(__dirname, './files'), project.root, {
|
|
19
20
|
tmpl: '',
|
|
20
21
|
});
|
|
21
22
|
(0, add_tailwind_style_imports_1.addTailwindStyleImports)(tree, project, options);
|