@nrwl/react 13.3.0-beta.1 → 13.3.0-beta.10

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.
Files changed (23) hide show
  1. package/package.json +9 -9
  2. package/plugins/storybook/index.js +3 -3
  3. package/plugins/storybook/index.js.map +1 -1
  4. package/src/generators/application/files/common/src/app/__fileName__.spec.tsx__tmpl__ +1 -1
  5. package/src/generators/application/files/common/src/app/nx-welcome.tsx +820 -0
  6. package/src/generators/application/files/css-module/src/app/__fileName__.module.__style__ +1 -128
  7. package/src/generators/application/files/css-module/src/app/__fileName__.tsx__tmpl__ +5 -82
  8. package/src/generators/application/files/global-css/src/app/__fileName__.__style__ +1 -128
  9. package/src/generators/application/files/global-css/src/app/__fileName__.tsx__tmpl__ +5 -82
  10. package/src/generators/application/files/none/src/app/__fileName__.tsx__tmpl__ +5 -5
  11. package/src/generators/application/files/styled-jsx/src/app/__fileName__.tsx__tmpl__ +5 -212
  12. package/src/generators/application/files/styled-module/src/app/__fileName__.tsx__tmpl__ +5 -208
  13. package/src/generators/application/lib/add-project.js +1 -1
  14. package/src/generators/application/lib/add-project.js.map +1 -1
  15. package/src/generators/library/library.js +1 -1
  16. package/src/generators/library/library.js.map +1 -1
  17. package/src/migrations/update-8-10-0/update-8-10-0.js +2 -1
  18. package/src/migrations/update-8-10-0/update-8-10-0.js.map +1 -1
  19. package/src/migrations/update-8-10-1/fix-react-tsconfig-8-10-1.js +2 -1
  20. package/src/migrations/update-8-10-1/fix-react-tsconfig-8-10-1.js.map +1 -1
  21. package/src/utils/versions.js +1 -1
  22. package/src/generators/application/files/common/src/app/logo.svg +0 -17
  23. package/src/generators/application/files/common/src/app/star.svg +0 -11
@@ -1,128 +1 @@
1
- .app {
2
- font-family: sans-serif;
3
- min-width: 300px;
4
- max-width: 600px;
5
- margin: 50px auto;
6
- }
7
-
8
- .app :global(.gutter-left) {
9
- margin-left: 9px;
10
- }
11
-
12
- .app :global(.col-span-2) {
13
- grid-column: span 2;
14
- }
15
-
16
- .app :global(.flex) {
17
- display: flex;
18
- align-items: center;
19
- justify-content: center;
20
- }
21
-
22
- .app :global(header) {
23
- background-color: #143055;
24
- color: white;
25
- padding: 5px;
26
- border-radius: 3px;
27
- }
28
-
29
- .app :global(main) {
30
- padding: 0 36px;
31
- }
32
-
33
- .app :global(p) {
34
- text-align: center;
35
- }
36
-
37
- .app :global(h1) {
38
- text-align: center;
39
- margin-left: 18px;
40
- font-size: 24px;
41
- }
42
-
43
- .app :global(h2) {
44
- text-align: center;
45
- font-size: 20px;
46
- margin: 40px 0 10px 0;
47
- }
48
-
49
- .app :global(.resources) {
50
- text-align: center;
51
- list-style: none;
52
- padding: 0;
53
- display: grid;
54
- grid-gap: 9px;
55
- grid-template-columns: 1fr 1fr;
56
- }
57
-
58
- .app :global(.resource) {
59
- color: #0094ba;
60
- height: 36px;
61
- background-color: rgba(0, 0, 0, 0);
62
- border: 1px solid rgba(0, 0, 0, 0.12);
63
- border-radius: 4px;
64
- padding: 3px 9px;
65
- text-decoration: none;
66
- }
67
-
68
- .app :global(.resource:hover) {
69
- background-color: rgba(68, 138, 255, 0.04);
70
- }
71
-
72
- .app :global(pre) {
73
- padding: 9px;
74
- border-radius: 4px;
75
- background-color: black;
76
- color: #eee;
77
- }
78
-
79
- .app :global(details) {
80
- border-radius: 4px;
81
- color: #333;
82
- background-color: rgba(0, 0, 0, 0);
83
- border: 1px solid rgba(0, 0, 0, 0.12);
84
- padding: 3px 9px;
85
- margin-bottom: 9px;
86
- }
87
-
88
- .app :global(summary) {
89
- outline: none;
90
- height: 36px;
91
- line-height: 36px;
92
- }
93
-
94
- .app :global(.github-star-container) {
95
- margin-top: 12px;
96
- line-height: 20px;
97
- }
98
-
99
- .app :global(.github-star-container a) {
100
- display: flex;
101
- align-items: center;
102
- text-decoration: none;
103
- color: #333;
104
- }
105
-
106
- .app :global(.github-star-badge) {
107
- color: #24292e;
108
- display: flex;
109
- align-items: center;
110
- font-size: 12px;
111
- padding: 3px 10px;
112
- border: 1px solid rgba(27, 31, 35, 0.2);
113
- border-radius: 3px;
114
- background-image: linear-gradient(-180deg, #fafbfc, #eff3f6 90%);
115
- margin-left: 4px;
116
- font-weight: 600;
117
- }
118
-
119
- .app :global(.github-star-badge:hover) {
120
- background-image: linear-gradient(-180deg, #f0f3f6, #e6ebf1 90%);
121
- border-color: rgba(27, 31, 35, 0.35);
122
- background-position: -0.5em;
123
- }
124
- .app :global(.github-star-badge .material-icons) {
125
- height: 16px;
126
- width: 16px;
127
- margin-right: 4px;
128
- }
1
+ /* Your styles goes here. */
@@ -2,9 +2,7 @@
2
2
  import { Component } from 'react';
3
3
  <% } %>
4
4
  import styles from './<%= fileName %>.module.<%= style %>';
5
-
6
- import { ReactComponent as Logo } from './logo.svg';
7
- import star from './star.svg';
5
+ import NxWelcome from "./nx-welcome";
8
6
 
9
7
  <% if (classComponent) { %>
10
8
  export class App extends Component {
@@ -13,85 +11,10 @@ export class App extends Component {
13
11
  export function App() {
14
12
  <% } %>
15
13
  return (
16
- <div className={styles.app}>
17
- <header className="flex">
18
- <Logo width="75" height="75"/>
19
- <h1>Welcome to <%= projectName %>!</h1>
20
- </header>
21
- <main>
22
- <h2>Resources &amp; Tools</h2>
23
- <p>
24
- Thank you for using and showing some ♥ for Nx.
25
- </p>
26
- <div className="flex github-star-container">
27
- <a href="https://github.com/nrwl/nx" target="_blank" rel="noopener noreferrer"> If you like Nx, please give it a star:
28
- <div className="github-star-badge">
29
- <img src={star} className="material-icons" alt="" />
30
- Star
31
- </div>
32
- </a>
33
- </div>
34
- <p>
35
- Here are some links to help you get started.
36
- </p>
37
- <ul className="resources">
38
- <li className="col-span-2">
39
- <a
40
- className="resource flex"
41
- href="https://egghead.io/playlists/scale-react-development-with-nx-4038"
42
- >
43
- Scale React Development with Nx (Course)
44
- </a>
45
- </li>
46
- <li className="col-span-2">
47
- <a
48
- className="resource flex"
49
- href="https://nx.dev/latest/react/tutorial/01-create-application"
50
- >
51
- Interactive tutorial
52
- </a>
53
- </li>
54
- <li className="col-span-2">
55
- <a className="resource flex" href="https://nx.app/">
56
- <svg width="36" height="36" viewBox="0 0 120 120" fill="none" xmlns="http://www.w3.org/2000/svg">
57
- <path d="M120 15V30C103.44 30 90 43.44 90 60C90 76.56 76.56 90 60 90C43.44 90 30 103.44 30 120H15C6.72 120 0 113.28 0 105V15C0 6.72 6.72 0 15 0H105C113.28 0 120 6.72 120 15Z" fill="#0E2039"/>
58
- <path d="M120 30V105C120 113.28 113.28 120 105 120H30C30 103.44 43.44 90 60 90C76.56 90 90 76.56 90 60C90 43.44 103.44 30 120 30Z" fill="white"/>
59
- </svg>
60
- <span className="gutter-left">Nx Cloud</span>
61
- </a>
62
- </li>
63
- </ul>
64
- <h2>Next Steps</h2>
65
- <p>
66
- Here are some things you can do with Nx.
67
- </p>
68
- <details open>
69
- <summary>Add UI library</summary>
70
- <pre>{`# Generate UI lib
71
- nx g @nrwl/react:lib ui
72
-
73
- # Add a component
74
- nx g @nrwl/react:component xyz --project ui`}</pre>
75
- </details>
76
- <details>
77
- <summary>View dependency graph</summary>
78
- <pre>{`nx dep-graph`}</pre>
79
- </details>
80
- <details>
81
- <summary>Run affected commands</summary>
82
- <pre>{`# see what's been affected by changes
83
- nx affected:dep-graph
84
-
85
- # run tests for current changes
86
- nx affected:test
87
-
88
- # run e2e tests for current changes
89
- nx affected:e2e
90
- `}</pre>
91
- </details>
92
- </main>
93
- </div>
94
- );
14
+ <>
15
+ <NxWelcome title="<%= projectName %>"/>
16
+ <div />
17
+ </>);
95
18
  <% if (classComponent) { %>
96
19
  }
97
20
  }
@@ -1,128 +1 @@
1
- .app {
2
- font-family: sans-serif;
3
- min-width: 300px;
4
- max-width: 600px;
5
- margin: 50px auto;
6
- }
7
-
8
- .app .gutter-left {
9
- margin-left: 9px;
10
- }
11
-
12
- .app .col-span-2 {
13
- grid-column: span 2;
14
- }
15
-
16
- .app .flex {
17
- display: flex;
18
- align-items: center;
19
- justify-content: center;
20
- }
21
-
22
- .app header {
23
- background-color: #143055;
24
- color: white;
25
- padding: 5px;
26
- border-radius: 3px;
27
- }
28
-
29
- .app main {
30
- padding: 0 36px;
31
- }
32
-
33
- .app p {
34
- text-align: center;
35
- }
36
-
37
- .app h1 {
38
- text-align: center;
39
- margin-left: 18px;
40
- font-size: 24px;
41
- }
42
-
43
- .app h2 {
44
- text-align: center;
45
- font-size: 20px;
46
- margin: 40px 0 10px 0;
47
- }
48
-
49
- .app .resources {
50
- text-align: center;
51
- list-style: none;
52
- padding: 0;
53
- display: grid;
54
- grid-gap: 9px;
55
- grid-template-columns: 1fr 1fr;
56
- }
57
-
58
- .app .resource {
59
- color: #0094ba;
60
- height: 36px;
61
- background-color: rgba(0, 0, 0, 0);
62
- border: 1px solid rgba(0, 0, 0, 0.12);
63
- border-radius: 4px;
64
- padding: 3px 9px;
65
- text-decoration: none;
66
- }
67
-
68
- .app .resource:hover {
69
- background-color: rgba(68, 138, 255, 0.04);
70
- }
71
-
72
- .app pre {
73
- padding: 9px;
74
- border-radius: 4px;
75
- background-color: black;
76
- color: #eee;
77
- }
78
-
79
- .app details {
80
- border-radius: 4px;
81
- color: #333;
82
- background-color: rgba(0, 0, 0, 0);
83
- border: 1px solid rgba(0, 0, 0, 0.12);
84
- padding: 3px 9px;
85
- margin-bottom: 9px;
86
- }
87
-
88
- .app summary {
89
- outline: none;
90
- height: 36px;
91
- line-height: 36px;
92
- }
93
-
94
- .app .github-star-container {
95
- margin-top: 12px;
96
- line-height: 20px;
97
- }
98
-
99
- .app .github-star-container a {
100
- display: flex;
101
- align-items: center;
102
- text-decoration: none;
103
- color: #333;
104
- }
105
-
106
- .app .github-star-badge {
107
- color: #24292e;
108
- display: flex;
109
- align-items: center;
110
- font-size: 12px;
111
- padding: 3px 10px;
112
- border: 1px solid rgba(27, 31, 35, 0.2);
113
- border-radius: 3px;
114
- background-image: linear-gradient(-180deg, #fafbfc, #eff3f6 90%);
115
- margin-left: 4px;
116
- font-weight: 600;
117
- }
118
-
119
- .app .github-star-badge:hover {
120
- background-image: linear-gradient(-180deg, #f0f3f6, #e6ebf1 90%);
121
- border-color: rgba(27, 31, 35, 0.35);
122
- background-position: -0.5em;
123
- }
124
- .app .github-star-badge .material-icons {
125
- height: 16px;
126
- width: 16px;
127
- margin-right: 4px;
128
- }
1
+ /* Your styles goes here. */
@@ -2,9 +2,7 @@
2
2
  import { Component } from 'react';
3
3
  <% } %>
4
4
  import './<%= fileName %>.<%= style %>';
5
-
6
- import { ReactComponent as Logo } from './logo.svg';
7
- import star from './star.svg';
5
+ import NxWelcome from "./nx-welcome";
8
6
 
9
7
  <% if (classComponent) { %>
10
8
  export class App extends Component {
@@ -13,85 +11,10 @@ export class App extends Component {
13
11
  export function App() {
14
12
  <% } %>
15
13
  return (
16
- <div className="app">
17
- <header className="flex">
18
- <Logo width="75" height="75"/>
19
- <h1>Welcome to <%= projectName %>!</h1>
20
- </header>
21
- <main>
22
- <h2>Resources &amp; Tools</h2>
23
- <p>
24
- Thank you for using and showing some ♥ for Nx.
25
- </p>
26
- <div className="flex github-star-container">
27
- <a href="https://github.com/nrwl/nx" target="_blank" rel="noopener noreferrer"> If you like Nx, please give it a star:
28
- <div className="github-star-badge">
29
- <img src={star} className="material-icons" alt="" />
30
- Star
31
- </div>
32
- </a>
33
- </div>
34
- <p>
35
- Here are some links to help you get started.
36
- </p>
37
- <ul className="resources">
38
- <li className="col-span-2">
39
- <a
40
- className="resource flex"
41
- href="https://egghead.io/playlists/scale-react-development-with-nx-4038"
42
- >
43
- Scale React Development with Nx (Course)
44
- </a>
45
- </li>
46
- <li className="col-span-2">
47
- <a
48
- className="resource flex"
49
- href="https://nx.dev/latest/react/tutorial/01-create-application"
50
- >
51
- Interactive tutorial
52
- </a>
53
- </li>
54
- <li className="col-span-2">
55
- <a className="resource flex" href="https://nx.app/">
56
- <svg width="36" height="36" viewBox="0 0 120 120" fill="none" xmlns="http://www.w3.org/2000/svg">
57
- <path d="M120 15V30C103.44 30 90 43.44 90 60C90 76.56 76.56 90 60 90C43.44 90 30 103.44 30 120H15C6.72 120 0 113.28 0 105V15C0 6.72 6.72 0 15 0H105C113.28 0 120 6.72 120 15Z" fill="#0E2039"/>
58
- <path d="M120 30V105C120 113.28 113.28 120 105 120H30C30 103.44 43.44 90 60 90C76.56 90 90 76.56 90 60C90 43.44 103.44 30 120 30Z" fill="white"/>
59
- </svg>
60
- <span className="gutter-left">Nx Cloud</span>
61
- </a>
62
- </li>
63
- </ul>
64
- <h2>Next Steps</h2>
65
- <p>
66
- Here are some things you can do with Nx.
67
- </p>
68
- <details open>
69
- <summary>Add UI library</summary>
70
- <pre>{`# Generate UI lib
71
- nx g @nrwl/react:lib ui
72
-
73
- # Add a component
74
- nx g @nrwl/react:component xyz --project ui`}</pre>
75
- </details>
76
- <details>
77
- <summary>View dependency graph</summary>
78
- <pre>{`nx dep-graph`}</pre>
79
- </details>
80
- <details>
81
- <summary>Run affected commands</summary>
82
- <pre>{`# see what's been affected by changes
83
- nx affected:dep-graph
84
-
85
- # run tests for current changes
86
- nx affected:test
87
-
88
- # run e2e tests for current changes
89
- nx affected:e2e
90
- `}</pre>
91
- </details>
92
- </main>
93
- </div>
94
- );
14
+ <>
15
+ <NxWelcome title="<%= projectName %>"/>
16
+ <div />
17
+ </>);
95
18
  <% if (classComponent) { %>
96
19
  }
97
20
  }
@@ -1,9 +1,7 @@
1
1
  <% if (classComponent) { %>
2
2
  import { Component } from 'react';
3
3
  <% } %>
4
-
5
- import { ReactComponent as Logo } from './logo.svg';
6
- import star from './star.svg';
4
+ import NxWelcome from "./nx-welcome";
7
5
 
8
6
  <% if (classComponent) { %>
9
7
  export class App extends Component {
@@ -12,8 +10,10 @@ export class App extends Component {
12
10
  export function App() {
13
11
  <% } %>
14
12
  return (
15
- <h1>Welcome to <%= projectName %>!</h1>
16
- );
13
+ <>
14
+ <NxWelcome title="<%= projectName %>"/>
15
+ <div />
16
+ </>);
17
17
  <% if (classComponent) { %>
18
18
  }
19
19
  }
@@ -1,9 +1,7 @@
1
1
  <% if (classComponent) { %>
2
2
  import { Component } from 'react';
3
3
  <% } %>
4
-
5
- import { ReactComponent as Logo } from './logo.svg';
6
- import star from './star.svg';
4
+ import NxWelcome from "./nx-welcome";
7
5
 
8
6
  <% if (classComponent) { %>
9
7
  export class App extends Component {
@@ -12,215 +10,10 @@ export class App extends Component {
12
10
  export function App() {
13
11
  <% } %>
14
12
  return (
15
- <div className="app">
16
- <style jsx>{`
17
- .app {
18
- font-family: sans-serif;
19
- min-width: 300px;
20
- max-width: 600px;
21
- margin: 50px auto;
22
- }
23
-
24
- .gutter-left {
25
- margin-left: 9px;
26
- }
27
-
28
- .col-span-2 {
29
- grid-column: span 2;
30
- }
31
-
32
- .flex {
33
- display: flex;
34
- align-items: center;
35
- justify-content: center;
36
- }
37
-
38
- header {
39
- background-color: #143055;
40
- color: white;
41
- padding: 5px;
42
- border-radius: 3px;
43
- }
44
-
45
- main {
46
- padding: 0 36px;
47
- }
48
-
49
- p {
50
- text-align: center;
51
- }
52
-
53
- h1 {
54
- text-align: center;
55
- margin-left: 18px;
56
- font-size: 24px;
57
- }
58
-
59
- h2 {
60
- text-align: center;
61
- font-size: 20px;
62
- margin: 40px 0 10px 0;
63
- }
64
-
65
- .resources {
66
- text-align: center;
67
- list-style: none;
68
- padding: 0;
69
- display: grid;
70
- grid-gap: 9px;
71
- grid-template-columns: 1fr 1fr;
72
- }
73
-
74
- .resource {
75
- color: #0094ba;
76
- height: 36px;
77
- background-color: rgba(0, 0, 0, 0);
78
- border: 1px solid rgba(0, 0, 0, 0.12);
79
- border-radius: 4px;
80
- padding: 3px 9px;
81
- text-decoration: none;
82
- }
83
-
84
- .resource:hover {
85
- background-color: rgba(68, 138, 255, 0.04);
86
- }
87
-
88
- pre {
89
- padding: 9px;
90
- border-radius: 4px;
91
- background-color: black;
92
- color: #eee;
93
- }
94
-
95
- details {
96
- border-radius: 4px;
97
- color: #333;
98
- background-color: rgba(0, 0, 0, 0);
99
- border: 1px solid rgba(0, 0, 0, 0.12);
100
- padding: 3px 9px;
101
- margin-bottom: 9px;
102
- }
103
-
104
- summary {
105
- outline: none;
106
- height: 36px;
107
- line-height: 36px;
108
- }
109
-
110
- .github-star-container {
111
- margin-top: 12px;
112
- line-height: 20px;
113
- }
114
-
115
- .github-star-container a {
116
- display: flex;
117
- align-items: center;
118
- text-decoration: none;
119
- color: #333;
120
- }
121
-
122
- .github-star-badge {
123
- color: #24292e;
124
- display: flex;
125
- align-items: center;
126
- font-size: 12px;
127
- padding: 3px 10px;
128
- border: 1px solid rgba(27, 31, 35, 0.2);
129
- border-radius: 3px;
130
- background-image: linear-gradient(-180deg, #fafbfc, #eff3f6 90%);
131
- margin-left: 4px;
132
- font-weight: 600;
133
- }
134
-
135
- .github-star-badge:hover {
136
- background-image: linear-gradient(-180deg, #f0f3f6, #e6ebf1 90%);
137
- border-color: rgba(27, 31, 35, 0.35);
138
- background-position: -0.5em;
139
- }
140
- .github-star-badge .material-icons {
141
- height: 16px;
142
- width: 16px;
143
- margin-right: 4px;
144
- }
145
- `}</style>
146
-
147
- <header className="flex">
148
- <Logo width="75" height="75" />
149
- <h1>Welcome to <%= projectName %>!</h1>
150
- </header>
151
- <main>
152
- <h2>Resources &amp; Tools</h2>
153
- <p>Thank you for using and showing some ♥ for Nx.</p>
154
- <div className="flex github-star-container">
155
- <a
156
- href="https://github.com/nrwl/nx"
157
- target="_blank"
158
- rel="noopener noreferrer"
159
- >
160
- {' '}
161
- If you like Nx, please give it a star:
162
- <div className="github-star-badge">
163
- <img src={star} className="material-icons" alt="" />
164
- Star
165
- </div>
166
- </a>
167
- </div>
168
- <p>Here are some links to help you get started.</p>
169
- <ul className="resources">
170
- <li className="col-span-2">
171
- <a
172
- className="resource flex"
173
- href="https://egghead.io/playlists/scale-react-development-with-nx-4038"
174
- >
175
- Scale React Development with Nx (Course)
176
- </a>
177
- </li>
178
- <li className="col-span-2">
179
- <a
180
- className="resource flex"
181
- href="https://nx.dev/latest/react/tutorial/01-create-application"
182
- >
183
- Interactive tutorial
184
- </a>
185
- </li>
186
- <li className="col-span-2">
187
- <a className="resource flex" href="https://nx.app/">
188
- <svg width="36" height="36" viewBox="0 0 120 120" fill="none" xmlns="http://www.w3.org/2000/svg">
189
- <path d="M120 15V30C103.44 30 90 43.44 90 60C90 76.56 76.56 90 60 90C43.44 90 30 103.44 30 120H15C6.72 120 0 113.28 0 105V15C0 6.72 6.72 0 15 0H105C113.28 0 120 6.72 120 15Z" fill="#0E2039"/>
190
- <path d="M120 30V105C120 113.28 113.28 120 105 120H30C30 103.44 43.44 90 60 90C76.56 90 90 76.56 90 60C90 43.44 103.44 30 120 30Z" fill="white"/>
191
- </svg>
192
- <span className="gutter-left">Nx Cloud</span>
193
- </a>
194
- </li>
195
- </ul>
196
- <h2>Next Steps</h2>
197
- <p>Here are some things you can do with Nx.</p>
198
- <details open>
199
- <summary>Add UI library</summary>
200
- <pre>{`# Generate UI lib
201
- nx g @nrwl/react:lib ui
202
-
203
- # Add a component
204
- nx g @nrwl/react:component xyz --project ui`}</pre>
205
- </details>
206
- <details>
207
- <summary>View dependency graph</summary>
208
- <pre>{`nx dep-graph`}</pre>
209
- </details>
210
- <details>
211
- <summary>Run affected commands</summary>
212
- <pre>{`# see what's been affected by changes
213
- nx affected:dep-graph
214
-
215
- # run tests for current changes
216
- nx affected:test
217
-
218
- # run e2e tests for current changes
219
- nx affected:e2e
220
- `}</pre>
221
- </details>
222
- </main>
223
- </div>
13
+ <>
14
+ <style jsx>{`/** your style here **/`}</style>
15
+ <NxWelcome title="<%= projectName %>"/>
16
+ </>
224
17
  );
225
18
 
226
19
  <% if (classComponent) { %>