forked from nrwl/nx
-
Notifications
You must be signed in to change notification settings - Fork 0
/
nx-plugin.json
340 lines (340 loc) · 11.9 KB
/
nx-plugin.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
{
"githubRoot": "https://github.com/nrwl/nx/blob/master",
"name": "nx-plugin",
"description": "Plugin for creating plugins for Nx :)",
"root": "/packages/nx-plugin",
"source": "/packages/nx-plugin/src",
"generators": [
{
"name": "plugin",
"factory": "./src/generators/plugin/plugin",
"schema": {
"$schema": "http://json-schema.org/schema",
"cli": "nx",
"$id": "NxPluginPlugin",
"title": "Create a Plugin for Nx",
"description": "Create a Plugin for Nx.",
"type": "object",
"examples": [
{
"command": "g plugin my-plugin --directory=plugins --importPath=@myorg/my-plugin",
"description": "Generate `libs/plugins/my-plugin`"
}
],
"properties": {
"name": {
"type": "string",
"description": "Plugin name",
"$default": { "$source": "argv", "index": 0 },
"x-prompt": "What name would you like to use for the plugin?"
},
"directory": {
"type": "string",
"description": "A directory where the plugin is placed.",
"alias": "d"
},
"importPath": {
"type": "string",
"description": "How the plugin will be published, like `@myorg/my-awesome-plugin`. Note this must be a valid NPM name."
},
"linter": {
"description": "The tool to use for running lint checks.",
"type": "string",
"enum": ["eslint", "tslint"],
"default": "eslint"
},
"unitTestRunner": {
"type": "string",
"enum": ["jest", "none"],
"description": "Test runner to use for unit tests.",
"default": "jest"
},
"tags": {
"type": "string",
"description": "Add tags to the library (used for linting).",
"alias": "t"
},
"skipFormat": {
"description": "Skip formatting files.",
"type": "boolean",
"default": false
},
"skipTsConfig": {
"type": "boolean",
"default": false,
"description": "Do not update tsconfig.json for development experience."
},
"standaloneConfig": {
"description": "Split the project configuration into `<projectRoot>/project.json` rather than including it inside `workspace.json`.",
"type": "boolean"
},
"setParserOptionsProject": {
"type": "boolean",
"description": "Whether or not to configure the ESLint `parserOptions.project` option. We do not do this by default for lint performance reasons.",
"default": false
},
"compiler": {
"type": "string",
"enum": ["tsc", "swc"],
"default": "tsc",
"description": "The compiler used by the build and test targets."
}
},
"required": ["name"],
"additionalProperties": false,
"presets": []
},
"description": "Create a Nx Plugin.",
"implementation": "/packages/nx-plugin/src/generators/plugin/plugin.ts",
"aliases": [],
"hidden": false,
"path": "/packages/nx-plugin/src/generators/plugin/schema.json"
},
{
"name": "e2e-project",
"factory": "./src/generators/e2e-project/e2e",
"schema": {
"$schema": "http://json-schema.org/schema",
"cli": "nx",
"$id": "NxPluginE2E",
"title": "Create an E2E app for a Nx Plugin",
"description": "Create an E2E app for a Nx Plugin.",
"type": "object",
"properties": {
"pluginName": {
"type": "string",
"description": "the name of the plugin to be tested."
},
"npmPackageName": {
"type": "string",
"description": "the name of the package that would be published to NPM."
},
"projectDirectory": {
"type": "string",
"description": "the directory where the plugin is placed."
},
"pluginOutputPath": {
"type": "string",
"description": "the output path of the plugin after it builds."
},
"jestConfig": {
"type": "string",
"description": "Jest config file."
},
"tsSpecConfig": {
"type": "string",
"description": "Spec `tsconfig` file.",
"x-deprecated": true
},
"standaloneConfig": {
"description": "Split the project configuration into `<projectRoot>/project.json` rather than including it inside `workspace.json`.",
"type": "boolean"
}
},
"required": ["pluginName", "npmPackageName"],
"additionalProperties": false,
"presets": []
},
"description": "Create a E2E application for a Nx Plugin.",
"hidden": true,
"implementation": "/packages/nx-plugin/src/generators/e2e-project/e2e.ts",
"aliases": [],
"path": "/packages/nx-plugin/src/generators/e2e-project/schema.json"
},
{
"name": "migration",
"factory": "./src/generators/migration/migration",
"schema": {
"$schema": "http://json-schema.org/schema",
"cli": "nx",
"$id": "NxPluginMigration",
"title": "Create a Migration for an Nx Plugin",
"description": "Create a Migration for an Nx Plugin.",
"type": "object",
"examples": [
{
"command": "nx g migration my-migration --project=my-plugin --version=1.0.0",
"description": "Generate `libs/my-plugin/src/migrations/my-migration`"
}
],
"properties": {
"project": {
"type": "string",
"description": "The name of the project.",
"alias": "p",
"$default": { "$source": "projectName" },
"x-prompt": "What is the name of the project for the migration?"
},
"name": {
"type": "string",
"description": "Migration name.",
"$default": { "$source": "argv", "index": 0 }
},
"description": {
"type": "string",
"description": "Migration description.",
"alias": "d"
},
"packageVersion": {
"type": "string",
"description": "Version to use for the migration.",
"alias": "v",
"x-prompt": "What version would you like to use for the migration?"
},
"packageJsonUpdates": {
"type": "boolean",
"description": "Whether or not to include `package.json` updates.",
"alias": "p",
"default": false
}
},
"required": ["project", "packageVersion"],
"additionalProperties": false,
"presets": []
},
"description": "Create a migration for an Nx Plugin.",
"implementation": "/packages/nx-plugin/src/generators/migration/migration.ts",
"aliases": [],
"hidden": false,
"path": "/packages/nx-plugin/src/generators/migration/schema.json"
},
{
"name": "generator",
"factory": "./src/generators/generator/generator",
"schema": {
"$schema": "http://json-schema.org/schema",
"cli": "nx",
"$id": "NxPluginGenerator",
"title": "Create a Generator for an Nx Plugin",
"description": "Create a Generator for an Nx Plugin.",
"type": "object",
"examples": [
{
"command": "nx g generator my-generator --project=my-plugin",
"description": "Generate `libs/my-plugin/src/generators/my-generator`"
}
],
"properties": {
"project": {
"type": "string",
"description": "The name of the project.",
"alias": "p",
"$default": { "$source": "projectName" },
"x-prompt": "What is the name of the project for the generator?"
},
"name": {
"type": "string",
"description": "Generator name.",
"$default": { "$source": "argv", "index": 0 },
"x-prompt": "What name would you like to use for the generator?"
},
"description": {
"type": "string",
"description": "Generator description.",
"alias": "d"
},
"unitTestRunner": {
"type": "string",
"enum": ["jest", "none"],
"description": "Test runner to use for unit tests.",
"default": "jest"
}
},
"required": ["project", "name"],
"additionalProperties": false,
"presets": []
},
"description": "Create a generator for an Nx Plugin.",
"implementation": "/packages/nx-plugin/src/generators/generator/generator.ts",
"aliases": [],
"hidden": false,
"path": "/packages/nx-plugin/src/generators/generator/schema.json"
},
{
"name": "executor",
"factory": "./src/generators/executor/executor",
"schema": {
"$schema": "http://json-schema.org/schema",
"cli": "nx",
"$id": "NxPluginExecutor",
"title": "Create a Executor for an Nx Plugin",
"description": "Create a Executor for an Nx Plugin.",
"type": "object",
"examples": [
{
"command": "nx g executor my-executor --project=my-plugin",
"description": "Generate `libs/my-plugin/src/executors/my-executor`"
}
],
"properties": {
"project": {
"type": "string",
"description": "The name of the project.",
"alias": "p",
"$default": { "$source": "projectName" },
"x-prompt": "What is the name of the project for the executor?"
},
"name": {
"type": "string",
"description": "Executor name.",
"$default": { "$source": "argv", "index": 0 },
"x-prompt": "What name would you like to use for the executor?"
},
"description": {
"type": "string",
"description": "Executor description.",
"alias": "d"
},
"unitTestRunner": {
"type": "string",
"enum": ["jest", "none"],
"description": "Test runner to use for unit tests.",
"default": "jest"
}
},
"required": ["project", "name"],
"additionalProperties": false,
"presets": []
},
"description": "Create a executor for an Nx Plugin.",
"implementation": "/packages/nx-plugin/src/generators/executor/executor.ts",
"aliases": [],
"hidden": false,
"path": "/packages/nx-plugin/src/generators/executor/schema.json"
}
],
"executors": [
{
"name": "e2e",
"implementation": "/packages/nx-plugin/src/executors/e2e/e2e.impl.ts",
"schema": {
"title": "Nx Plugin Playground Target",
"description": "Creates a playground for a Nx Plugin.",
"cli": "nx",
"type": "object",
"properties": {
"target": {
"description": "The build target for the Nx Plugin project.",
"type": "string"
},
"jestConfig": {
"type": "string",
"description": "Jest config file."
},
"tsSpecConfig": {
"type": "string",
"description": "The tsconfig file for specs.",
"x-deprecated": "Use the `tsconfig` property for `ts-jest` in the e2e project `jest.config.js` file. It will be removed in the next major release."
}
},
"additionalProperties": false,
"required": ["target", "jestConfig"],
"presets": []
},
"description": "Creates and runs the E2E tests for an Nx Plugin.",
"aliases": [],
"hidden": false,
"path": "/packages/nx-plugin/src/executors/e2e/schema.json"
}
]
}