@nx/react 22.7.0-beta.7 → 22.7.0-beta.9

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.
@@ -1,213 +1,213 @@
1
1
  {
2
- "$schema": "https://json-schema.org/schema",
3
- "cli": "nx",
4
- "$id": "NxReactApp",
5
- "title": "Create a React Application",
6
- "description": "Create a React application for Nx.",
7
- "examples": [
8
- {
9
- "command": "nx g app apps/myorg/myapp",
10
- "description": "Generate `apps/myorg/myapp` and `apps/myorg/myapp-e2e`"
11
- },
12
- {
13
- "command": "nx g app apps/myapp --classComponent",
14
- "description": "Use class components instead of functional components"
15
- },
16
- {
17
- "command": "nx g app apps/myapp --routing",
18
- "description": "Set up React Router"
19
- },
20
- {
21
- "command": "nx g app apps/myapp --port=3000",
22
- "description": "Set up the dev server to use port 3000"
23
- }
24
- ],
25
- "type": "object",
26
- "properties": {
27
- "directory": {
28
- "description": "The directory of the new application.",
29
- "type": "string",
30
- "alias": "dir",
31
- "$default": {
32
- "$source": "argv",
33
- "index": 0
34
- },
35
- "x-prompt": "Which directory do you want to create the application in?"
36
- },
37
- "name": {
38
- "description": "The name of the application.",
39
- "type": "string",
40
- "pattern": "(?:^@[a-zA-Z0-9-*~][a-zA-Z0-9-*._~]*\\/[a-zA-Z0-9-~][a-zA-Z0-9-._~]*|^[a-zA-Z][^:]*)$",
41
- "x-priority": "important"
42
- },
43
- "style": {
44
- "description": "The file extension to be used for style files.",
45
- "type": "string",
46
- "default": "css",
47
- "alias": "s",
48
- "x-prompt": {
49
- "message": "Which stylesheet format would you like to use?",
50
- "type": "list",
51
- "items": [
52
- {
53
- "value": "css",
54
- "label": "CSS"
55
- },
56
- {
57
- "value": "scss",
58
- "label": "SASS(.scss) [ https://sass-lang.com ]"
59
- },
60
- {
61
- "value": "less",
62
- "label": "LESS [ https://lesscss.org ]"
63
- },
64
- {
65
- "value": "tailwind",
66
- "label": "tailwind [ https://tailwindcss.com/ ]"
67
- },
68
- {
69
- "value": "styled-components",
70
- "label": "styled-components [ https://styled-components.com ]"
71
- },
72
- {
73
- "value": "@emotion/styled",
74
- "label": "emotion [ https://emotion.sh ]"
75
- },
76
- {
77
- "value": "styled-jsx",
78
- "label": "styled-jsx [ https://www.npmjs.com/package/styled-jsx ]"
79
- },
80
- {
81
- "value": "none",
82
- "label": "None"
83
- }
84
- ]
85
- }
86
- },
87
- "routing": {
88
- "type": "boolean",
89
- "description": "Generate application with routes.",
90
- "x-prompt": "Would you like to add routing to this application?",
91
- "default": false
92
- },
93
- "useReactRouter": {
94
- "description": "Use React Router for routing.",
95
- "type": "boolean",
96
- "default": false
97
- },
98
- "skipFormat": {
99
- "description": "Skip formatting files.",
100
- "type": "boolean",
101
- "default": false,
102
- "x-priority": "internal"
103
- },
104
- "skipNxJson": {
105
- "description": "Skip updating `nx.json` with default options based on values provided to this app.",
106
- "type": "boolean",
107
- "default": false,
108
- "x-priority": "internal"
109
- },
110
- "bundler": {
111
- "description": "The bundler to use.",
112
- "type": "string",
113
- "enum": ["vite", "rsbuild", "rspack", "webpack"],
114
- "x-prompt": "Which bundler do you want to use to build the application?",
115
- "default": "vite",
116
- "x-priority": "important"
117
- },
118
- "linter": {
119
- "description": "The tool to use for running lint checks.",
120
- "type": "string",
121
- "enum": ["eslint", "none"],
122
- "default": "none",
123
- "x-prompt": "Which linter would you like to use?",
124
- "x-priority": "important"
125
- },
126
- "unitTestRunner": {
127
- "type": "string",
128
- "enum": ["vitest", "jest", "none"],
129
- "description": "Test runner to use for unit tests.",
130
- "default": "none",
131
- "x-prompt": "What unit test runner should be used?",
132
- "x-priority": "important"
133
- },
134
- "inSourceTests": {
135
- "type": "boolean",
136
- "default": false,
137
- "description": "When using Vitest, separate spec files will not be generated and instead will be included within the source files. Read more on the Vitest docs site: https://vitest.dev/guide/in-source.html"
138
- },
139
- "e2eTestRunner": {
140
- "type": "string",
141
- "enum": ["playwright", "cypress", "none"],
142
- "description": "Test runner to use for end to end (E2E) tests.",
143
- "x-prompt": "Which E2E test runner would you like to use?",
144
- "default": "playwright"
145
- },
146
- "tags": {
147
- "type": "string",
148
- "description": "Add tags to the application (used for linting).",
149
- "alias": "t"
150
- },
151
- "classComponent": {
152
- "type": "boolean",
153
- "description": "Use class components instead of functional component.",
154
- "alias": "C",
155
- "default": false
156
- },
157
- "js": {
158
- "type": "boolean",
159
- "description": "Generate JavaScript files rather than TypeScript files.",
160
- "default": false
161
- },
162
- "globalCss": {
163
- "type": "boolean",
164
- "description": "Default is `false`. When `true`, the component is generated with `*.css`/`*.scss` instead of `*.module.css`/`*.module.scss`.",
165
- "default": false
166
- },
167
- "strict": {
168
- "type": "boolean",
169
- "description": "Creates an application with strict mode and strict type checking.",
170
- "default": true
171
- },
172
- "setParserOptionsProject": {
173
- "type": "boolean",
174
- "description": "Whether or not to configure the ESLint `parserOptions.project` option. We do not do this by default for lint performance reasons.",
175
- "default": false
176
- },
177
- "compiler": {
178
- "type": "string",
179
- "description": "The compiler to use.",
180
- "enum": ["babel", "swc"],
181
- "default": "babel"
182
- },
183
- "skipPackageJson": {
184
- "description": "Do not add dependencies to `package.json`.",
185
- "type": "boolean",
186
- "default": false,
187
- "x-priority": "internal"
188
- },
189
- "rootProject": {
190
- "description": "Create a application at the root of the workspace",
191
- "type": "boolean",
192
- "default": false,
193
- "hidden": true
194
- },
195
- "minimal": {
196
- "description": "Generate a React app with a minimal setup, no separate test files.",
197
- "type": "boolean",
198
- "default": false
199
- },
200
- "useProjectJson": {
201
- "type": "boolean",
202
- "description": "Use a `project.json` configuration file instead of inlining the Nx configuration in the `package.json` file."
203
- },
204
- "port": {
205
- "type": "number",
206
- "description": "The port to use for the development server",
207
- "x-prompt": "Which port would you like to use for the dev server?",
208
- "default": 4200
209
- }
210
- },
211
- "required": ["directory"],
212
- "examplesFile": "../../../docs/application-examples.md"
2
+ "$schema": "https://json-schema.org/schema",
3
+ "cli": "nx",
4
+ "$id": "NxReactApp",
5
+ "title": "Create a React Application",
6
+ "description": "Create a React application for Nx.",
7
+ "examples": [
8
+ {
9
+ "command": "nx g app apps/myorg/myapp",
10
+ "description": "Generate `apps/myorg/myapp` and `apps/myorg/myapp-e2e`"
11
+ },
12
+ {
13
+ "command": "nx g app apps/myapp --classComponent",
14
+ "description": "Use class components instead of functional components"
15
+ },
16
+ {
17
+ "command": "nx g app apps/myapp --routing",
18
+ "description": "Set up React Router"
19
+ },
20
+ {
21
+ "command": "nx g app apps/myapp --port=3000",
22
+ "description": "Set up the dev server to use port 3000"
23
+ }
24
+ ],
25
+ "type": "object",
26
+ "properties": {
27
+ "directory": {
28
+ "description": "The directory of the new application.",
29
+ "type": "string",
30
+ "alias": "dir",
31
+ "$default": {
32
+ "$source": "argv",
33
+ "index": 0
34
+ },
35
+ "x-prompt": "Which directory do you want to create the application in?"
36
+ },
37
+ "name": {
38
+ "description": "The name of the application.",
39
+ "type": "string",
40
+ "pattern": "(?:^@[a-zA-Z0-9-*~][a-zA-Z0-9-*._~]*\\/[a-zA-Z0-9-~][a-zA-Z0-9-._~]*|^[a-zA-Z][^:]*)$",
41
+ "x-priority": "important"
42
+ },
43
+ "style": {
44
+ "description": "The file extension to be used for style files.",
45
+ "type": "string",
46
+ "default": "css",
47
+ "alias": "s",
48
+ "x-prompt": {
49
+ "message": "Which stylesheet format would you like to use?",
50
+ "type": "list",
51
+ "items": [
52
+ {
53
+ "value": "css",
54
+ "label": "CSS"
55
+ },
56
+ {
57
+ "value": "scss",
58
+ "label": "SASS(.scss) [ https://sass-lang.com ]"
59
+ },
60
+ {
61
+ "value": "less",
62
+ "label": "LESS [ https://lesscss.org ]"
63
+ },
64
+ {
65
+ "value": "tailwind",
66
+ "label": "tailwind [ https://tailwindcss.com/ ]"
67
+ },
68
+ {
69
+ "value": "styled-components",
70
+ "label": "styled-components [ https://styled-components.com ]"
71
+ },
72
+ {
73
+ "value": "@emotion/styled",
74
+ "label": "emotion [ https://emotion.sh ]"
75
+ },
76
+ {
77
+ "value": "styled-jsx",
78
+ "label": "styled-jsx [ https://www.npmjs.com/package/styled-jsx ]"
79
+ },
80
+ {
81
+ "value": "none",
82
+ "label": "None"
83
+ }
84
+ ]
85
+ }
86
+ },
87
+ "routing": {
88
+ "type": "boolean",
89
+ "description": "Generate application with routes.",
90
+ "x-prompt": "Would you like to add routing to this application?",
91
+ "default": false
92
+ },
93
+ "useReactRouter": {
94
+ "description": "Use React Router for routing.",
95
+ "type": "boolean",
96
+ "default": false
97
+ },
98
+ "skipFormat": {
99
+ "description": "Skip formatting files.",
100
+ "type": "boolean",
101
+ "default": false,
102
+ "x-priority": "internal"
103
+ },
104
+ "skipNxJson": {
105
+ "description": "Skip updating `nx.json` with default options based on values provided to this app.",
106
+ "type": "boolean",
107
+ "default": false,
108
+ "x-priority": "internal"
109
+ },
110
+ "bundler": {
111
+ "description": "The bundler to use.",
112
+ "type": "string",
113
+ "enum": ["vite", "rsbuild", "rspack", "webpack"],
114
+ "x-prompt": "Which bundler do you want to use to build the application?",
115
+ "default": "vite",
116
+ "x-priority": "important"
117
+ },
118
+ "linter": {
119
+ "description": "The tool to use for running lint checks.",
120
+ "type": "string",
121
+ "enum": ["eslint", "none"],
122
+ "default": "none",
123
+ "x-prompt": "Which linter would you like to use?",
124
+ "x-priority": "important"
125
+ },
126
+ "unitTestRunner": {
127
+ "type": "string",
128
+ "enum": ["vitest", "jest", "none"],
129
+ "description": "Test runner to use for unit tests.",
130
+ "default": "none",
131
+ "x-prompt": "What unit test runner should be used?",
132
+ "x-priority": "important"
133
+ },
134
+ "inSourceTests": {
135
+ "type": "boolean",
136
+ "default": false,
137
+ "description": "When using Vitest, separate spec files will not be generated and instead will be included within the source files. Read more on the Vitest docs site: https://vitest.dev/guide/in-source.html"
138
+ },
139
+ "e2eTestRunner": {
140
+ "type": "string",
141
+ "enum": ["playwright", "cypress", "none"],
142
+ "description": "Test runner to use for end to end (E2E) tests.",
143
+ "x-prompt": "Which E2E test runner would you like to use?",
144
+ "default": "playwright"
145
+ },
146
+ "tags": {
147
+ "type": "string",
148
+ "description": "Add tags to the application (used for linting).",
149
+ "alias": "t"
150
+ },
151
+ "classComponent": {
152
+ "type": "boolean",
153
+ "description": "Use class components instead of functional component.",
154
+ "alias": "C",
155
+ "default": false
156
+ },
157
+ "js": {
158
+ "type": "boolean",
159
+ "description": "Generate JavaScript files rather than TypeScript files.",
160
+ "default": false
161
+ },
162
+ "globalCss": {
163
+ "type": "boolean",
164
+ "description": "Default is `false`. When `true`, the component is generated with `*.css`/`*.scss` instead of `*.module.css`/`*.module.scss`.",
165
+ "default": false
166
+ },
167
+ "strict": {
168
+ "type": "boolean",
169
+ "description": "Creates an application with strict mode and strict type checking.",
170
+ "default": true
171
+ },
172
+ "setParserOptionsProject": {
173
+ "type": "boolean",
174
+ "description": "Whether or not to configure the ESLint `parserOptions.project` option. We do not do this by default for lint performance reasons.",
175
+ "default": false
176
+ },
177
+ "compiler": {
178
+ "type": "string",
179
+ "description": "The compiler to use.",
180
+ "enum": ["babel", "swc"],
181
+ "default": "babel"
182
+ },
183
+ "skipPackageJson": {
184
+ "description": "Do not add dependencies to `package.json`.",
185
+ "type": "boolean",
186
+ "default": false,
187
+ "x-priority": "internal"
188
+ },
189
+ "rootProject": {
190
+ "description": "Create a application at the root of the workspace",
191
+ "type": "boolean",
192
+ "default": false,
193
+ "hidden": true
194
+ },
195
+ "minimal": {
196
+ "description": "Generate a React app with a minimal setup, no separate test files.",
197
+ "type": "boolean",
198
+ "default": false
199
+ },
200
+ "useProjectJson": {
201
+ "type": "boolean",
202
+ "description": "Use a `project.json` configuration file instead of inlining the Nx configuration in the `package.json` file."
203
+ },
204
+ "port": {
205
+ "type": "number",
206
+ "description": "The port to use for the development server",
207
+ "x-prompt": "Which port would you like to use for the dev server?",
208
+ "default": 4200
209
+ }
210
+ },
211
+ "required": ["directory"],
212
+ "examplesFile": "../../../docs/application-examples.md"
213
213
  }
@@ -1,114 +1,114 @@
1
1
  {
2
- "$schema": "https://json-schema.org/schema",
3
- "cli": "nx",
4
- "$id": "NxReactComponent",
5
- "title": "Create a React Component",
6
- "description": "Create a React Component for Nx.",
7
- "type": "object",
8
- "properties": {
9
- "path": {
10
- "type": "string",
11
- "description": "The file path to the component. Relative to the current working directory.",
12
- "$default": {
13
- "$source": "argv",
14
- "index": 0
15
- },
16
- "x-prompt": "What is the component file path?",
17
- "x-priority": "important"
2
+ "$schema": "https://json-schema.org/schema",
3
+ "cli": "nx",
4
+ "$id": "NxReactComponent",
5
+ "title": "Create a React Component",
6
+ "description": "Create a React Component for Nx.",
7
+ "type": "object",
8
+ "properties": {
9
+ "path": {
10
+ "type": "string",
11
+ "description": "The file path to the component. Relative to the current working directory.",
12
+ "$default": {
13
+ "$source": "argv",
14
+ "index": 0
15
+ },
16
+ "x-prompt": "What is the component file path?",
17
+ "x-priority": "important"
18
+ },
19
+ "name": {
20
+ "type": "string",
21
+ "description": "The component symbol name. Defaults to the last segment of the file path."
22
+ },
23
+ "style": {
24
+ "description": "The file extension to be used for style files.",
25
+ "type": "string",
26
+ "alias": "s",
27
+ "default": "css",
28
+ "x-prompt": {
29
+ "message": "Which stylesheet format would you like to use?",
30
+ "type": "list",
31
+ "items": [
32
+ {
33
+ "value": "css",
34
+ "label": "CSS"
35
+ },
36
+ {
37
+ "value": "scss",
38
+ "label": "SASS(.scss) [ https://sass-lang.com ]"
39
+ },
40
+ {
41
+ "value": "less",
42
+ "label": "LESS [ https://lesscss.org ]"
43
+ },
44
+ {
45
+ "value": "tailwind",
46
+ "label": "tailwind [ https://tailwindcss.com/ ]"
47
+ },
48
+ {
49
+ "value": "styled-components",
50
+ "label": "styled-components [ https://styled-components.com ]"
51
+ },
52
+ {
53
+ "value": "@emotion/styled",
54
+ "label": "emotion [ https://emotion.sh ]"
55
+ },
56
+ {
57
+ "value": "styled-jsx",
58
+ "label": "styled-jsx [ https://www.npmjs.com/package/styled-jsx ]"
59
+ },
60
+ {
61
+ "value": "none",
62
+ "label": "None"
63
+ }
64
+ ]
65
+ }
66
+ },
67
+ "js": {
68
+ "type": "boolean",
69
+ "description": "Generate JavaScript files rather than TypeScript files.",
70
+ "x-deprecated": "Provide the full file path including the file extension in the `path` option. This option will be removed in Nx v21."
71
+ },
72
+ "skipTests": {
73
+ "type": "boolean",
74
+ "description": "When true, does not create `spec.ts` test files for the new component.",
75
+ "default": false,
76
+ "x-priority": "internal"
77
+ },
78
+ "export": {
79
+ "type": "boolean",
80
+ "description": "When true, the component is exported from the project `index.ts` (if it exists).",
81
+ "alias": "e",
82
+ "default": false,
83
+ "x-prompt": "Should this component be exported in the project?"
84
+ },
85
+ "classComponent": {
86
+ "type": "boolean",
87
+ "alias": "C",
88
+ "description": "Use class components instead of functional component.",
89
+ "default": false
90
+ },
91
+ "routing": {
92
+ "type": "boolean",
93
+ "description": "Generate a library with routes."
94
+ },
95
+ "globalCss": {
96
+ "type": "boolean",
97
+ "description": "Default is `false`. When `true`, the component is generated with `*.css`/`*.scss` instead of `*.module.css`/`*.module.scss`.",
98
+ "default": false
99
+ },
100
+ "inSourceTests": {
101
+ "type": "boolean",
102
+ "default": false,
103
+ "description": "When using Vitest, separate spec files will not be generated and instead will be included within the source files. Read more on the Vitest docs site: https://vitest.dev/guide/in-source.html"
104
+ },
105
+ "skipFormat": {
106
+ "description": "Skip formatting files.",
107
+ "type": "boolean",
108
+ "default": false,
109
+ "x-priority": "internal"
110
+ }
18
111
  },
19
- "name": {
20
- "type": "string",
21
- "description": "The component symbol name. Defaults to the last segment of the file path."
22
- },
23
- "style": {
24
- "description": "The file extension to be used for style files.",
25
- "type": "string",
26
- "alias": "s",
27
- "default": "css",
28
- "x-prompt": {
29
- "message": "Which stylesheet format would you like to use?",
30
- "type": "list",
31
- "items": [
32
- {
33
- "value": "css",
34
- "label": "CSS"
35
- },
36
- {
37
- "value": "scss",
38
- "label": "SASS(.scss) [ https://sass-lang.com ]"
39
- },
40
- {
41
- "value": "less",
42
- "label": "LESS [ https://lesscss.org ]"
43
- },
44
- {
45
- "value": "tailwind",
46
- "label": "tailwind [ https://tailwindcss.com/ ]"
47
- },
48
- {
49
- "value": "styled-components",
50
- "label": "styled-components [ https://styled-components.com ]"
51
- },
52
- {
53
- "value": "@emotion/styled",
54
- "label": "emotion [ https://emotion.sh ]"
55
- },
56
- {
57
- "value": "styled-jsx",
58
- "label": "styled-jsx [ https://www.npmjs.com/package/styled-jsx ]"
59
- },
60
- {
61
- "value": "none",
62
- "label": "None"
63
- }
64
- ]
65
- }
66
- },
67
- "js": {
68
- "type": "boolean",
69
- "description": "Generate JavaScript files rather than TypeScript files.",
70
- "x-deprecated": "Provide the full file path including the file extension in the `path` option. This option will be removed in Nx v21."
71
- },
72
- "skipTests": {
73
- "type": "boolean",
74
- "description": "When true, does not create `spec.ts` test files for the new component.",
75
- "default": false,
76
- "x-priority": "internal"
77
- },
78
- "export": {
79
- "type": "boolean",
80
- "description": "When true, the component is exported from the project `index.ts` (if it exists).",
81
- "alias": "e",
82
- "default": false,
83
- "x-prompt": "Should this component be exported in the project?"
84
- },
85
- "classComponent": {
86
- "type": "boolean",
87
- "alias": "C",
88
- "description": "Use class components instead of functional component.",
89
- "default": false
90
- },
91
- "routing": {
92
- "type": "boolean",
93
- "description": "Generate a library with routes."
94
- },
95
- "globalCss": {
96
- "type": "boolean",
97
- "description": "Default is `false`. When `true`, the component is generated with `*.css`/`*.scss` instead of `*.module.css`/`*.module.scss`.",
98
- "default": false
99
- },
100
- "inSourceTests": {
101
- "type": "boolean",
102
- "default": false,
103
- "description": "When using Vitest, separate spec files will not be generated and instead will be included within the source files. Read more on the Vitest docs site: https://vitest.dev/guide/in-source.html"
104
- },
105
- "skipFormat": {
106
- "description": "Skip formatting files.",
107
- "type": "boolean",
108
- "default": false,
109
- "x-priority": "internal"
110
- }
111
- },
112
- "required": ["path"],
113
- "examplesFile": "../../../docs/component-examples.md"
112
+ "required": ["path"],
113
+ "examplesFile": "../../../docs/component-examples.md"
114
114
  }