@nx/react 22.7.0-beta.8 → 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,195 +1,195 @@
1
1
  {
2
- "$schema": "https://json-schema.org/schema",
3
- "cli": "nx",
4
- "$id": "NxReactLibrary",
5
- "title": "Create a React Library",
6
- "description": "Create a React Library for an Nx workspace.",
7
- "type": "object",
8
- "examples": [
9
- {
10
- "command": "nx g @nx/react:lib libs/mylib",
11
- "description": "Generate a library under `libs/mylib`"
12
- },
13
- {
14
- "command": "nx g @nx/react:lib mylib --appProject=myapp",
15
- "description": "Generate a library under mylib with routes and add them to `myapp`"
16
- }
17
- ],
18
- "properties": {
19
- "directory": {
20
- "type": "string",
21
- "description": "A directory where the lib is placed.",
22
- "alias": "dir",
23
- "$default": {
24
- "$source": "argv",
25
- "index": 0
26
- },
27
- "x-prompt": "Which directory do you want to create the library in?"
28
- },
29
- "name": {
30
- "type": "string",
31
- "description": "Library name",
32
- "x-priority": "important"
33
- },
34
- "style": {
35
- "description": "The file extension to be used for style files.",
36
- "type": "string",
37
- "default": "css",
38
- "alias": "s",
39
- "x-prompt": {
40
- "message": "Which stylesheet format would you like to use?",
41
- "type": "list",
42
- "items": [
43
- {
44
- "value": "css",
45
- "label": "CSS"
46
- },
47
- {
48
- "value": "scss",
49
- "label": "SASS(.scss) [ https://sass-lang.com ]"
50
- },
51
- {
52
- "value": "less",
53
- "label": "LESS [ https://lesscss.org ]"
54
- },
55
- {
56
- "value": "tailwind",
57
- "label": "tailwind [ https://tailwindcss.com/ ]"
58
- },
59
- {
60
- "value": "styled-components",
61
- "label": "styled-components [ https://styled-components.com ]"
62
- },
63
- {
64
- "value": "@emotion/styled",
65
- "label": "emotion [ https://emotion.sh ]"
66
- },
67
- {
68
- "value": "styled-jsx",
69
- "label": "styled-jsx [ https://www.npmjs.com/package/styled-jsx ]"
70
- },
71
- {
72
- "value": "none",
73
- "label": "None"
74
- }
75
- ]
76
- }
77
- },
78
- "bundler": {
79
- "type": "string",
80
- "description": "The bundler to use. Choosing 'none' means this library is not buildable.",
81
- "enum": ["none", "vite", "rollup"],
82
- "default": "none",
83
- "x-prompt": "Which bundler would you like to use to build the library? Choose 'none' to skip build setup.",
84
- "x-priority": "important"
85
- },
86
- "linter": {
87
- "description": "The tool to use for running lint checks.",
88
- "type": "string",
89
- "enum": ["eslint", "none"],
90
- "default": "none",
91
- "x-prompt": "Which linter would you like to use?",
92
- "x-priority": "important"
93
- },
94
- "unitTestRunner": {
95
- "type": "string",
96
- "enum": ["vitest", "jest", "none"],
97
- "default": "none",
98
- "description": "Test runner to use for unit tests.",
99
- "x-prompt": "What unit test runner should be used?",
100
- "x-priority": "important"
101
- },
102
- "inSourceTests": {
103
- "type": "boolean",
104
- "default": false,
105
- "description": "When using Vitest, separate spec files will not be generated and instead will be included within the source files."
106
- },
107
- "tags": {
108
- "type": "string",
109
- "description": "Add tags to the library (used for linting).",
110
- "alias": "t"
111
- },
112
- "skipFormat": {
113
- "description": "Skip formatting files.",
114
- "type": "boolean",
115
- "default": false,
116
- "x-priority": "internal"
117
- },
118
- "skipTsConfig": {
119
- "type": "boolean",
120
- "default": false,
121
- "description": "Do not update `tsconfig.json` for development experience.",
122
- "x-priority": "internal"
123
- },
124
- "routing": {
125
- "type": "boolean",
126
- "description": "Generate library with routes."
127
- },
128
- "appProject": {
129
- "type": "string",
130
- "description": "The application project to add the library route to.",
131
- "alias": "a"
132
- },
133
- "publishable": {
134
- "type": "boolean",
135
- "description": "Create a publishable library."
136
- },
137
- "buildable": {
138
- "type": "boolean",
139
- "default": false,
140
- "description": "Generate a buildable library that uses rollup to bundle.",
141
- "x-deprecated": "Use the `bundler` option for greater control (none, vite, rollup)."
142
- },
143
- "importPath": {
144
- "type": "string",
145
- "description": "The library name used to import it, like `@myorg/my-awesome-lib`."
146
- },
147
- "component": {
148
- "type": "boolean",
149
- "description": "Generate a default component.",
150
- "default": true
151
- },
152
- "js": {
153
- "type": "boolean",
154
- "description": "Generate JavaScript files rather than TypeScript files.",
155
- "default": false
156
- },
157
- "globalCss": {
158
- "type": "boolean",
159
- "description": "When `true`, the stylesheet is generated using global CSS instead of CSS modules (e.g. file is `*.css` rather than `*.module.css`).",
160
- "default": false
161
- },
162
- "strict": {
163
- "type": "boolean",
164
- "description": "Whether to enable tsconfig strict mode or not.",
165
- "default": true
166
- },
167
- "setParserOptionsProject": {
168
- "type": "boolean",
169
- "description": "Whether or not to configure the ESLint `parserOptions.project` option. We do not do this by default for lint performance reasons.",
170
- "default": false
171
- },
172
- "compiler": {
173
- "type": "string",
174
- "enum": ["babel", "swc"],
175
- "default": "babel",
176
- "description": "Which compiler to use."
177
- },
178
- "skipPackageJson": {
179
- "description": "Do not add dependencies to `package.json`.",
180
- "type": "boolean",
181
- "default": false,
182
- "x-priority": "internal"
183
- },
184
- "minimal": {
185
- "description": "Create a React library with a minimal setup, no separate test files.",
186
- "type": "boolean",
187
- "default": false
188
- },
189
- "useProjectJson": {
190
- "type": "boolean",
191
- "description": "Use a `project.json` configuration file instead of inlining the Nx configuration in the `package.json` file."
192
- }
193
- },
194
- "required": ["directory"]
2
+ "$schema": "https://json-schema.org/schema",
3
+ "cli": "nx",
4
+ "$id": "NxReactLibrary",
5
+ "title": "Create a React Library",
6
+ "description": "Create a React Library for an Nx workspace.",
7
+ "type": "object",
8
+ "examples": [
9
+ {
10
+ "command": "nx g @nx/react:lib libs/mylib",
11
+ "description": "Generate a library under `libs/mylib`"
12
+ },
13
+ {
14
+ "command": "nx g @nx/react:lib mylib --appProject=myapp",
15
+ "description": "Generate a library under mylib with routes and add them to `myapp`"
16
+ }
17
+ ],
18
+ "properties": {
19
+ "directory": {
20
+ "type": "string",
21
+ "description": "A directory where the lib is placed.",
22
+ "alias": "dir",
23
+ "$default": {
24
+ "$source": "argv",
25
+ "index": 0
26
+ },
27
+ "x-prompt": "Which directory do you want to create the library in?"
28
+ },
29
+ "name": {
30
+ "type": "string",
31
+ "description": "Library name",
32
+ "x-priority": "important"
33
+ },
34
+ "style": {
35
+ "description": "The file extension to be used for style files.",
36
+ "type": "string",
37
+ "default": "css",
38
+ "alias": "s",
39
+ "x-prompt": {
40
+ "message": "Which stylesheet format would you like to use?",
41
+ "type": "list",
42
+ "items": [
43
+ {
44
+ "value": "css",
45
+ "label": "CSS"
46
+ },
47
+ {
48
+ "value": "scss",
49
+ "label": "SASS(.scss) [ https://sass-lang.com ]"
50
+ },
51
+ {
52
+ "value": "less",
53
+ "label": "LESS [ https://lesscss.org ]"
54
+ },
55
+ {
56
+ "value": "tailwind",
57
+ "label": "tailwind [ https://tailwindcss.com/ ]"
58
+ },
59
+ {
60
+ "value": "styled-components",
61
+ "label": "styled-components [ https://styled-components.com ]"
62
+ },
63
+ {
64
+ "value": "@emotion/styled",
65
+ "label": "emotion [ https://emotion.sh ]"
66
+ },
67
+ {
68
+ "value": "styled-jsx",
69
+ "label": "styled-jsx [ https://www.npmjs.com/package/styled-jsx ]"
70
+ },
71
+ {
72
+ "value": "none",
73
+ "label": "None"
74
+ }
75
+ ]
76
+ }
77
+ },
78
+ "bundler": {
79
+ "type": "string",
80
+ "description": "The bundler to use. Choosing 'none' means this library is not buildable.",
81
+ "enum": ["none", "vite", "rollup"],
82
+ "default": "none",
83
+ "x-prompt": "Which bundler would you like to use to build the library? Choose 'none' to skip build setup.",
84
+ "x-priority": "important"
85
+ },
86
+ "linter": {
87
+ "description": "The tool to use for running lint checks.",
88
+ "type": "string",
89
+ "enum": ["eslint", "none"],
90
+ "default": "none",
91
+ "x-prompt": "Which linter would you like to use?",
92
+ "x-priority": "important"
93
+ },
94
+ "unitTestRunner": {
95
+ "type": "string",
96
+ "enum": ["vitest", "jest", "none"],
97
+ "default": "none",
98
+ "description": "Test runner to use for unit tests.",
99
+ "x-prompt": "What unit test runner should be used?",
100
+ "x-priority": "important"
101
+ },
102
+ "inSourceTests": {
103
+ "type": "boolean",
104
+ "default": false,
105
+ "description": "When using Vitest, separate spec files will not be generated and instead will be included within the source files."
106
+ },
107
+ "tags": {
108
+ "type": "string",
109
+ "description": "Add tags to the library (used for linting).",
110
+ "alias": "t"
111
+ },
112
+ "skipFormat": {
113
+ "description": "Skip formatting files.",
114
+ "type": "boolean",
115
+ "default": false,
116
+ "x-priority": "internal"
117
+ },
118
+ "skipTsConfig": {
119
+ "type": "boolean",
120
+ "default": false,
121
+ "description": "Do not update `tsconfig.json` for development experience.",
122
+ "x-priority": "internal"
123
+ },
124
+ "routing": {
125
+ "type": "boolean",
126
+ "description": "Generate library with routes."
127
+ },
128
+ "appProject": {
129
+ "type": "string",
130
+ "description": "The application project to add the library route to.",
131
+ "alias": "a"
132
+ },
133
+ "publishable": {
134
+ "type": "boolean",
135
+ "description": "Create a publishable library."
136
+ },
137
+ "buildable": {
138
+ "type": "boolean",
139
+ "default": false,
140
+ "description": "Generate a buildable library that uses rollup to bundle.",
141
+ "x-deprecated": "Use the `bundler` option for greater control (none, vite, rollup)."
142
+ },
143
+ "importPath": {
144
+ "type": "string",
145
+ "description": "The library name used to import it, like `@myorg/my-awesome-lib`."
146
+ },
147
+ "component": {
148
+ "type": "boolean",
149
+ "description": "Generate a default component.",
150
+ "default": true
151
+ },
152
+ "js": {
153
+ "type": "boolean",
154
+ "description": "Generate JavaScript files rather than TypeScript files.",
155
+ "default": false
156
+ },
157
+ "globalCss": {
158
+ "type": "boolean",
159
+ "description": "When `true`, the stylesheet is generated using global CSS instead of CSS modules (e.g. file is `*.css` rather than `*.module.css`).",
160
+ "default": false
161
+ },
162
+ "strict": {
163
+ "type": "boolean",
164
+ "description": "Whether to enable tsconfig strict mode or not.",
165
+ "default": true
166
+ },
167
+ "setParserOptionsProject": {
168
+ "type": "boolean",
169
+ "description": "Whether or not to configure the ESLint `parserOptions.project` option. We do not do this by default for lint performance reasons.",
170
+ "default": false
171
+ },
172
+ "compiler": {
173
+ "type": "string",
174
+ "enum": ["babel", "swc"],
175
+ "default": "babel",
176
+ "description": "Which compiler to use."
177
+ },
178
+ "skipPackageJson": {
179
+ "description": "Do not add dependencies to `package.json`.",
180
+ "type": "boolean",
181
+ "default": false,
182
+ "x-priority": "internal"
183
+ },
184
+ "minimal": {
185
+ "description": "Create a React library with a minimal setup, no separate test files.",
186
+ "type": "boolean",
187
+ "default": false
188
+ },
189
+ "useProjectJson": {
190
+ "type": "boolean",
191
+ "description": "Use a `project.json` configuration file instead of inlining the Nx configuration in the `package.json` file."
192
+ }
193
+ },
194
+ "required": ["directory"]
195
195
  }
@@ -1,49 +1,49 @@
1
1
  {
2
- "$schema": "https://json-schema.org/schema",
3
- "cli": "nx",
4
- "$id": "redux",
5
- "title": "Create Redux state",
6
- "description": "Create a Redux state slice for a React project.",
7
- "type": "object",
8
- "examples": [
9
- {
10
- "description": "Generate a Redux state slice with the exported symbol matching the file name. It results in the slice `fooSlice` at `mylib/src/lib/foo.slice.ts`",
11
- "command": "nx g @nx/react:redux mylib/src/lib/foo.slice.ts"
2
+ "$schema": "https://json-schema.org/schema",
3
+ "cli": "nx",
4
+ "$id": "redux",
5
+ "title": "Create Redux state",
6
+ "description": "Create a Redux state slice for a React project.",
7
+ "type": "object",
8
+ "examples": [
9
+ {
10
+ "description": "Generate a Redux state slice with the exported symbol matching the file name. It results in the slice `fooSlice` at `mylib/src/lib/foo.slice.ts`",
11
+ "command": "nx g @nx/react:redux mylib/src/lib/foo.slice.ts"
12
+ },
13
+ {
14
+ "description": "Generate a Redux state slice with the exported symbol different from the file name. It results in the slice `customSlice` at `mylib/src/lib/foo.slice.ts`",
15
+ "command": "nx g @nx/react:redux mylib/src/lib/foo.slice.ts --name=custom"
16
+ },
17
+ {
18
+ "description": "Generate a Redux state slice without providing the \"slice\" suffix and the file extension. It results in the slice `fooSlice` at `mylib/src/lib/foo.slice.ts`",
19
+ "command": "nx g @nx/react:redux mylib/src/lib/foo"
20
+ }
21
+ ],
22
+ "properties": {
23
+ "path": {
24
+ "type": "string",
25
+ "description": "The file path to the Redux state slice. Relative to the current working directory.",
26
+ "$default": {
27
+ "$source": "argv",
28
+ "index": 0
29
+ },
30
+ "x-prompt": "What is the Redux stateslice file path?",
31
+ "x-priority": "important"
32
+ },
33
+ "name": {
34
+ "type": "string",
35
+ "description": "The Redux state slice symbol name. Defaults to the last segment of the file path."
36
+ },
37
+ "appProject": {
38
+ "type": "string",
39
+ "description": "The application project to add the slice to.",
40
+ "alias": "a"
41
+ },
42
+ "js": {
43
+ "type": "boolean",
44
+ "description": "Generate JavaScript files rather than TypeScript files.",
45
+ "x-deprecated": "Provide the full file path including the file extension in the `path` option. This option will be removed in Nx v21."
46
+ }
12
47
  },
13
- {
14
- "description": "Generate a Redux state slice with the exported symbol different from the file name. It results in the slice `customSlice` at `mylib/src/lib/foo.slice.ts`",
15
- "command": "nx g @nx/react:redux mylib/src/lib/foo.slice.ts --name=custom"
16
- },
17
- {
18
- "description": "Generate a Redux state slice without providing the \"slice\" suffix and the file extension. It results in the slice `fooSlice` at `mylib/src/lib/foo.slice.ts`",
19
- "command": "nx g @nx/react:redux mylib/src/lib/foo"
20
- }
21
- ],
22
- "properties": {
23
- "path": {
24
- "type": "string",
25
- "description": "The file path to the Redux state slice. Relative to the current working directory.",
26
- "$default": {
27
- "$source": "argv",
28
- "index": 0
29
- },
30
- "x-prompt": "What is the Redux stateslice file path?",
31
- "x-priority": "important"
32
- },
33
- "name": {
34
- "type": "string",
35
- "description": "The Redux state slice symbol name. Defaults to the last segment of the file path."
36
- },
37
- "appProject": {
38
- "type": "string",
39
- "description": "The application project to add the slice to.",
40
- "alias": "a"
41
- },
42
- "js": {
43
- "type": "boolean",
44
- "description": "Generate JavaScript files rather than TypeScript files.",
45
- "x-deprecated": "Provide the full file path including the file extension in the `path` option. This option will be removed in Nx v21."
46
- }
47
- },
48
- "required": ["path"]
48
+ "required": ["path"]
49
49
  }