@nrwl/react 13.5.0-beta.9 → 13.5.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/README.md +61 -1
- package/package.json +9 -9
- package/src/generators/application/files/common/src/app/nx-welcome.tsx +3 -3
- package/src/generators/application/files/css-module/src/app/__fileName__.tsx__tmpl__ +1 -0
- package/src/generators/application/lib/normalize-options.js +2 -1
- package/src/generators/application/lib/normalize-options.js.map +1 -1
- package/src/utils/versions.js +1 -1
package/README.md
CHANGED
|
@@ -21,4 +21,64 @@ Nx is a next generation build system with first class monorepo support and power
|
|
|
21
21
|
|
|
22
22
|
This package is a [React plugin for Nx](https://nx.dev/react/overview).
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
## Getting Started
|
|
25
|
+
|
|
26
|
+
### Creating an Nx Workspace
|
|
27
|
+
|
|
28
|
+
**Using `npx`**
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
npx create-nx-workspace
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
**Using `npm init`**
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
npm init nx-workspace
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
**Using `yarn create`**
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
yarn create nx-workspace
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
The `create-nx-workspace` command will ask you to select a preset, which will configure some plugins and create your applications to help you get started.
|
|
47
|
+
|
|
48
|
+
```
|
|
49
|
+
? What to create in the new workspace (Use arrow keys)
|
|
50
|
+
❯ apps [an empty workspace with no plugins with a layout that works best for building apps]
|
|
51
|
+
core [an empty workspace with no plugins set up to publish npm packages (similar to yarn workspaces)]
|
|
52
|
+
ts [an empty workspace with the JS/TS plugin preinstalled]
|
|
53
|
+
react [a workspace with a single React application]
|
|
54
|
+
angular [a workspace with a single Angular application]
|
|
55
|
+
next.js [a workspace with a single Next.js application]
|
|
56
|
+
nest [a workspace with a single Nest application]
|
|
57
|
+
express [a workspace with a single Express application]
|
|
58
|
+
web components [a workspace with a single app built using web components]
|
|
59
|
+
react-native [a workspace with a single React Native application]
|
|
60
|
+
react-express [a workspace with a full stack application (React + Express)]
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Select the preset that works best for you
|
|
64
|
+
|
|
65
|
+
### Adding Nx to an Existing Monorepo
|
|
66
|
+
|
|
67
|
+
Run:
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
npx add-nx-to-monorepo@latest
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## Documentation & Resources
|
|
74
|
+
|
|
75
|
+
A few links to help you get started:
|
|
76
|
+
|
|
77
|
+
- [Nx.Dev: Documentation, Guides, Interactive Tutorials](https://nx.dev)
|
|
78
|
+
- [Tutorial: Adding Nx to an Existing Monorepo](https://nx.dev/migration/adding-to-monorepo)
|
|
79
|
+
- [Official Nx YouTube Channel](https://www.youtube.com/c/Nrwl_io)
|
|
80
|
+
- [Blog Posts About Nx](https://blog.nrwl.io/nx/home)
|
|
81
|
+
|
|
82
|
+
<p style="text-align: center;"><a href="https://nx.dev/#learning-materials" target="_blank"><img src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-courses-and-videos.svg"
|
|
83
|
+
width="100%" alt="Nx - Smart, Fast and Extensible Build System"></a></p>
|
|
84
|
+
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nrwl/react",
|
|
3
|
-
"version": "13.5.
|
|
3
|
+
"version": "13.5.2",
|
|
4
4
|
"description": "React Plugin for Nx",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -31,14 +31,14 @@
|
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@babel/core": "^7.15.0",
|
|
33
33
|
"@babel/preset-react": "^7.14.5",
|
|
34
|
-
"@nrwl/cypress": "13.5.
|
|
35
|
-
"@nrwl/devkit": "13.5.
|
|
36
|
-
"@nrwl/jest": "13.5.
|
|
37
|
-
"@nrwl/js": "13.5.
|
|
38
|
-
"@nrwl/linter": "13.5.
|
|
39
|
-
"@nrwl/storybook": "13.5.
|
|
40
|
-
"@nrwl/web": "13.5.
|
|
41
|
-
"@nrwl/workspace": "13.5.
|
|
34
|
+
"@nrwl/cypress": "13.5.2",
|
|
35
|
+
"@nrwl/devkit": "13.5.2",
|
|
36
|
+
"@nrwl/jest": "13.5.2",
|
|
37
|
+
"@nrwl/js": "13.5.2",
|
|
38
|
+
"@nrwl/linter": "13.5.2",
|
|
39
|
+
"@nrwl/storybook": "13.5.2",
|
|
40
|
+
"@nrwl/web": "13.5.2",
|
|
41
|
+
"@nrwl/workspace": "13.5.2",
|
|
42
42
|
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.1",
|
|
43
43
|
"@svgr/webpack": "^6.1.2",
|
|
44
44
|
"chalk": "4.1.0",
|
|
@@ -763,9 +763,9 @@ export function NxWelcome({ title }: { title: string }) {
|
|
|
763
763
|
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"
|
|
764
764
|
/>
|
|
765
765
|
</svg>
|
|
766
|
-
View interactive
|
|
766
|
+
View interactive project graph
|
|
767
767
|
</summary>
|
|
768
|
-
<pre>nx
|
|
768
|
+
<pre>nx graph</pre>
|
|
769
769
|
</details>
|
|
770
770
|
<details>
|
|
771
771
|
<summary>
|
|
@@ -786,7 +786,7 @@ export function NxWelcome({ title }: { title: string }) {
|
|
|
786
786
|
</summary>
|
|
787
787
|
<pre>
|
|
788
788
|
<span># see what's been affected by changes</span>
|
|
789
|
-
nx affected:
|
|
789
|
+
nx affected:graph
|
|
790
790
|
<span># run tests for current changes</span>
|
|
791
791
|
nx affected:test
|
|
792
792
|
<span># run e2e tests for current changes</span>
|
|
@@ -4,7 +4,7 @@ exports.normalizeOptions = void 0;
|
|
|
4
4
|
const assertion_1 = require("../../../utils/assertion");
|
|
5
5
|
const devkit_1 = require("@nrwl/devkit");
|
|
6
6
|
function normalizeOptions(host, options) {
|
|
7
|
-
var _a, _b, _c, _d, _e;
|
|
7
|
+
var _a, _b, _c, _d, _e, _f;
|
|
8
8
|
const appDirectory = options.directory
|
|
9
9
|
? `${(0, devkit_1.names)(options.directory).fileName}/${(0, devkit_1.names)(options.name).fileName}`
|
|
10
10
|
: (0, devkit_1.names)(options.name).fileName;
|
|
@@ -25,6 +25,7 @@ function normalizeOptions(host, options) {
|
|
|
25
25
|
options.classComponent = (_c = options.classComponent) !== null && _c !== void 0 ? _c : false;
|
|
26
26
|
options.unitTestRunner = (_d = options.unitTestRunner) !== null && _d !== void 0 ? _d : 'jest';
|
|
27
27
|
options.e2eTestRunner = (_e = options.e2eTestRunner) !== null && _e !== void 0 ? _e : 'cypress';
|
|
28
|
+
options.compiler = (_f = options.compiler) !== null && _f !== void 0 ? _f : 'babel';
|
|
28
29
|
return Object.assign(Object.assign({}, options), { name: (0, devkit_1.names)(options.name).fileName, projectName: appProjectName, appProjectRoot,
|
|
29
30
|
e2eProjectName,
|
|
30
31
|
parsedTags,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"normalize-options.js","sourceRoot":"","sources":["../../../../../../../packages/react/src/generators/application/lib/normalize-options.ts"],"names":[],"mappings":";;;AACA,wDAA4D;AAC5D,yCAA8E;AAE9E,SAAgB,gBAAgB,CAC9B,IAAU,EACV,OAAe;;IAEf,MAAM,YAAY,GAAG,OAAO,CAAC,SAAS;QACpC,CAAC,CAAC,GAAG,IAAA,cAAK,EAAC,OAAO,CAAC,SAAS,CAAC,CAAC,QAAQ,IAAI,IAAA,cAAK,EAAC,OAAO,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE;QACxE,CAAC,CAAC,IAAA,cAAK,EAAC,OAAO,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC;IAEjC,MAAM,cAAc,GAAG,YAAY,CAAC,OAAO,CA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OAAO,CAAC,OAAO,GAAG,MAAA,OAAO,CAAC,OAAO,mCAAI,KAAK,CAAC;IAC3C,OAAO,CAAC,MAAM,GAAG,MAAA,OAAO,CAAC,MAAM,mCAAI,IAAI,CAAC;IACxC,OAAO,CAAC,cAAc,GAAG,MAAA,OAAO,CAAC,cAAc,mCAAI,KAAK,CAAC;IACzD,OAAO,CAAC,cAAc,GAAG,MAAA,OAAO,CAAC,cAAc,mCAAI,MAAM,CAAC;IAC1D,OAAO,CAAC,aAAa,GAAG,MAAA,OAAO,CAAC,aAAa,mCAAI,SAAS,CAAC;IAC3D,OAAO,CAAC,QAAQ,GAAG,MAAA,OAAO,CAAC,QAAQ,mCAAI,OAAO,CAAC;IAE/C,uCACK,OAAO,KACV,IAAI,EAAE,IAAA,cAAK,EAAC,OAAO,CAAC,IAAI,CAAC,CAAC,QAAQ,EAClC,WAAW,EAAE,cAAc,EAC3B,cAAc;QACd,cAAc;QACd,UAAU;QACV,QAAQ;QACR,YAAY,EACZ,SAAS,EAAE,OAAO,CAAC,KAAK,KAAK,MAAM,IACnC;AACJ,CAAC;AA5CD,4CA4CC"}
|
package/src/utils/versions.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.babelPluginStyledComponentsVersion = exports.eslintPluginReactHooksVersion = exports.eslintPluginReactVersion = exports.eslintPluginJsxA11yVersion = exports.eslintPluginImportVersion = exports.reactTestRendererVersion = exports.reactReduxVersion = exports.reduxjsToolkitVersion = exports.testingLibraryReactHooksVersion = exports.testingLibraryReactVersion = exports.typesReactRouterDomVersion = exports.reactRouterDomVersion = exports.styledJsxVersion = exports.emotionBabelPlugin = exports.emotionReactVersion = exports.emotionStyledVersion = exports.typesStyledComponentsVersion = exports.styledComponentsVersion = exports.typesReactIsVersion = exports.typesReactDomVersion = exports.typesReactVersion = exports.reactIsVersion = exports.reactDomVersion = exports.reactVersion = exports.nxVersion = void 0;
|
|
4
|
-
exports.nxVersion = '13.5.
|
|
4
|
+
exports.nxVersion = '13.5.2';
|
|
5
5
|
exports.reactVersion = '17.0.2';
|
|
6
6
|
exports.reactDomVersion = '17.0.2';
|
|
7
7
|
exports.reactIsVersion = '17.0.2';
|