Skip to content

Commit c5137ea

Browse files
authored
Merge 655a94f into 7b6e72c
2 parents 7b6e72c + 655a94f commit c5137ea

File tree

17 files changed

+516
-191
lines changed

17 files changed

+516
-191
lines changed

nx.json

Lines changed: 163 additions & 100 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@
22
"$schema": "./node_modules/nx/schemas/nx-schema.json",
33
"namedInputs": {
44
"default": ["{projectRoot}/**/*", "sharedGlobals"],
5-
"os": [{ "runtime": "node -e \"console.log(require('os').platform())\"" }],
5+
"os": [
6+
{
7+
"runtime": "node -e \"console.log(require('os').platform())\""
8+
}
9+
],
610
"production": [
711
"default",
812
"!{projectRoot}/README.md",
@@ -25,23 +29,42 @@
2529
],
2630
"test-vitest-inputs": [
2731
"os",
28-
{ "env": "NX_VERBOSE_LOGGING" },
29-
{ "externalDependencies": ["vitest"] }
32+
{
33+
"env": "NX_VERBOSE_LOGGING"
34+
},
35+
{
36+
"externalDependencies": ["vitest"]
37+
}
3038
],
3139
"lint-eslint-inputs": [
3240
"{workspaceRoot}/eslint.config.js",
33-
{ "externalDependencies": ["eslint"] }
41+
{
42+
"externalDependencies": ["eslint"]
43+
}
3444
],
3545
"typecheck-typescript-inputs": [
3646
"{workspaceRoot}/tsconfig.base.json",
37-
{ "externalDependencies": ["typescript"] }
47+
{
48+
"externalDependencies": ["typescript"]
49+
}
3850
],
3951
"code-pushup-inputs": [
4052
"{workspaceRoot}/code-pushup.preset.ts",
41-
{ "env": "NODE_OPTIONS" },
42-
{ "env": "TSX_TSCONFIG_PATH" }
53+
{
54+
"env": "NODE_OPTIONS"
55+
},
56+
{
57+
"env": "TSX_TSCONFIG_PATH"
58+
}
4359
],
44-
"sharedGlobals": [{ "runtime": "node -v" }, { "runtime": "npm -v" }]
60+
"sharedGlobals": [
61+
{
62+
"runtime": "node -v"
63+
},
64+
{
65+
"runtime": "npm -v"
66+
}
67+
]
4568
},
4669
"targetDefaults": {
4770
"lint": {
@@ -124,18 +147,17 @@
124147
},
125148
"code-pushup": {
126149
"cache": false,
127-
"executor": "nx:run-commands",
128150
"dependsOn": ["code-pushup-*"],
129151
"options": {
130-
"command": "node packages/cli/src/index.ts",
131-
"args": [
132-
"--config={projectRoot}/code-pushup.config.ts",
133-
"--cache.read",
134-
"--persist.outputDir=.code-pushup/{projectName}"
135-
],
136-
"env": {
137-
"NODE_OPTIONS": "--import tsx",
138-
"TSX_TSCONFIG_PATH": "tsconfig.base.json"
152+
"config": "{projectRoot}/code-pushup.config.ts",
153+
"persist": {
154+
"outputDir": ".code-pushup/{projectName}"
155+
}
156+
},
157+
"configurations": {
158+
"print-config": {
159+
"command": "print-config",
160+
"output": "{projectRoot}/.code-pushup/code-pushup.config.json"
139161
}
140162
}
141163
},
@@ -146,19 +168,12 @@
146168
"outputs": [
147169
"{workspaceRoot}/.code-pushup/{projectName}/coverage/runner-output.json"
148170
],
149-
"executor": "nx:run-commands",
150171
"options": {
151-
"command": "node packages/cli/src/index.ts collect",
152-
"args": [
153-
"--config={projectRoot}/code-pushup.config.ts",
154-
"--cache.write",
155-
"--onlyPlugins=coverage",
156-
"--persist.skipReports=true",
157-
"--persist.outputDir=.code-pushup/{projectName}"
158-
],
159-
"env": {
160-
"NODE_OPTIONS": "--import tsx",
161-
"TSX_TSCONFIG_PATH": "tsconfig.base.json"
172+
"command": "collect",
173+
"config": "{projectRoot}/code-pushup.config.ts",
174+
"onlyPlugins": ["coverage"],
175+
"persist": {
176+
"outputDir": ".code-pushup/{projectName}"
162177
}
163178
}
164179
},
@@ -169,24 +184,17 @@
169184
"outputs": [
170185
"{workspaceRoot}/.code-pushup/{projectName}/eslint/runner-output.json"
171186
],
172-
"executor": "nx:run-commands",
173187
"options": {
174-
"command": "node packages/cli/src/index.ts collect",
175-
"args": [
176-
"--config={projectRoot}/code-pushup.config.ts",
177-
"--cache.write",
178-
"--onlyPlugins=eslint",
179-
"--persist.skipReports",
180-
"--persist.outputDir=.code-pushup/{projectName}"
181-
],
182-
"env": {
183-
"NODE_OPTIONS": "--import tsx",
184-
"TSX_TSCONFIG_PATH": "tsconfig.base.json"
188+
"command": "collect",
189+
"config": "{projectRoot}/code-pushup.config.ts",
190+
"onlyPlugins": ["eslint"],
191+
"persist": {
192+
"outputDir": ".code-pushup/{projectName}"
185193
}
186194
}
187195
},
188196
"code-pushup-js-packages": {
189-
"cache": false,
197+
"cache": true,
190198
"inputs": [
191199
{
192200
"runtime": "date +%Y-%m-%d"
@@ -195,17 +203,12 @@
195203
"outputs": [
196204
"{workspaceRoot}/.code-pushup/{projectName}/js-packages/runner-output.json"
197205
],
198-
"executor": "nx:run-commands",
199206
"options": {
200-
"command": "node packages/cli/src/index.ts collect",
201-
"args": [
202-
"--config={projectRoot}/code-pushup.config.ts",
203-
"--onlyPlugins=js-packages",
204-
"--persist.outputDir=.code-pushup/{projectName}"
205-
],
206-
"env": {
207-
"NODE_OPTIONS": "--import tsx",
208-
"TSX_TSCONFIG_PATH": "tsconfig.base.json"
207+
"command": "collect",
208+
"config": "{projectRoot}/code-pushup.config.ts",
209+
"onlyPlugins": ["js-packages"],
210+
"persist": {
211+
"outputDir": ".code-pushup/{projectName}"
209212
}
210213
}
211214
},
@@ -215,19 +218,12 @@
215218
"outputs": [
216219
"{workspaceRoot}/.code-pushup/{projectName}/lighthouse/runner-output.json"
217220
],
218-
"executor": "nx:run-commands",
219221
"options": {
220-
"command": "node packages/cli/src/index.ts collect",
221-
"args": [
222-
"--config={projectRoot}/code-pushup.config.ts",
223-
"--cache.write",
224-
"--onlyPlugins=lighthouse",
225-
"--persist.skipReports",
226-
"--persist.outputDir=.code-pushup/{projectName}"
227-
],
228-
"env": {
229-
"NODE_OPTIONS": "--import tsx",
230-
"TSX_TSCONFIG_PATH": "tsconfig.base.json"
222+
"command": "collect",
223+
"config": "{projectRoot}/code-pushup.config.ts",
224+
"onlyPlugins": ["lighthouse"],
225+
"persist": {
226+
"outputDir": ".code-pushup/{projectName}"
231227
}
232228
}
233229
},
@@ -241,19 +237,12 @@
241237
"outputs": [
242238
"{workspaceRoot}/.code-pushup/{projectName}/jsdocs/runner-output.json"
243239
],
244-
"executor": "nx:run-commands",
245240
"options": {
246-
"command": "node packages/cli/src/index.ts collect",
247-
"args": [
248-
"--config={projectRoot}/code-pushup.config.ts",
249-
"--cache.write",
250-
"--onlyPlugins=jsdocs",
251-
"--persist.skipReports",
252-
"--persist.outputDir=.code-pushup/{projectName}"
253-
],
254-
"env": {
255-
"NODE_OPTIONS": "--import tsx",
256-
"TSX_TSCONFIG_PATH": "tsconfig.base.json"
241+
"command": "collect",
242+
"config": "{projectRoot}/code-pushup.config.ts",
243+
"onlyPlugins": ["jsdocs"],
244+
"persist": {
245+
"outputDir": ".code-pushup/{projectName}"
257246
}
258247
}
259248
},
@@ -267,19 +256,12 @@
267256
"outputs": [
268257
"{workspaceRoot}/.code-pushup/{projectName}/typescript/runner-output.json"
269258
],
270-
"executor": "nx:run-commands",
271259
"options": {
272-
"command": "node packages/cli/src/index.ts collect",
273-
"args": [
274-
"--config={projectRoot}/code-pushup.config.ts",
275-
"--cache.write",
276-
"--onlyPlugins=typescript",
277-
"--persist.skipReports",
278-
"--persist.outputDir=.code-pushup/{projectName}"
279-
],
280-
"env": {
281-
"NODE_OPTIONS": "--import tsx",
282-
"TSX_TSCONFIG_PATH": "tsconfig.base.json"
260+
"command": "collect",
261+
"config": "{projectRoot}/code-pushup.config.ts",
262+
"onlyPlugins": ["typescript"],
263+
"persist": {
264+
"outputDir": ".code-pushup/{projectName}"
283265
}
284266
}
285267
},
@@ -289,18 +271,12 @@
289271
"outputs": [
290272
"{workspaceRoot}/.code-pushup/{projectName}/axe/runner-output.json"
291273
],
292-
"executor": "nx:run-commands",
293274
"options": {
294-
"command": "node packages/cli/src/index.ts collect",
295-
"args": [
296-
"--config={projectRoot}/code-pushup.config.ts",
297-
"--cache.write",
298-
"--onlyPlugins=axe",
299-
"--persist.outputDir=.code-pushup/{projectName}"
300-
],
301-
"env": {
302-
"NODE_OPTIONS": "--import tsx",
303-
"TSX_TSCONFIG_PATH": "tsconfig.base.json"
275+
"command": "collect",
276+
"config": "{projectRoot}/code-pushup.config.ts",
277+
"onlyPlugins": ["axe"],
278+
"persist": {
279+
"outputDir": ".code-pushup/{projectName}"
304280
}
305281
}
306282
},
@@ -311,12 +287,29 @@
311287
"packageRoot": "{projectRoot}/dist",
312288
"registry": "https://registry.npmjs.org/"
313289
}
290+
},
291+
"validate-cp-targets": {
292+
"executor": "nx:run-commands",
293+
"cache": false,
294+
"options": {
295+
"command": "node tools/scripts/validate-cp-targets.mjs"
296+
}
314297
}
315298
},
316299
"workspaceLayout": {
317300
"appsDir": "examples",
318301
"libsDir": "packages"
319302
},
303+
"pluginsConfig": {
304+
"@code-pushup/nx-plugin": {
305+
"projectPrefix": "cli",
306+
"bin": "packages/cli/src/index.ts",
307+
"env": {
308+
"NODE_OPTIONS": "--import tsx",
309+
"TSX_TSCONFIG_PATH": "tsconfig.base.json"
310+
}
311+
}
312+
},
320313
"generators": {},
321314
"release": {
322315
"projects": ["packages/*"],
@@ -346,6 +339,76 @@
346339
},
347340
"plugins": [
348341
"./tools/zod2md-jsdocs/src/nx-plugin.ts",
342+
{
343+
"plugin": "@code-pushup/nx-plugin",
344+
"options": {
345+
"targetName": "code-pushup",
346+
"projectPrefix": "cli"
347+
},
348+
"exclude": ["tools/**", "testing/**", "examples/**"]
349+
},
350+
{
351+
"plugin": "@code-pushup/nx-plugin",
352+
"options": {
353+
"targetName": "code-pushup-coverage"
354+
},
355+
"exclude": ["tools/**", "testing/**", "examples/**"]
356+
},
357+
{
358+
"plugin": "@code-pushup/nx-plugin",
359+
"options": {
360+
"targetName": "code-pushup-eslint"
361+
},
362+
"exclude": ["testing/**", "examples/**"]
363+
},
364+
{
365+
"plugin": "@code-pushup/nx-plugin",
366+
"options": {
367+
"targetName": "code-pushup-typescript"
368+
},
369+
"exclude": [
370+
"packages/models/**",
371+
"packages/plugin-lighthouse",
372+
"packages/plugin-js-packages",
373+
"tools/**",
374+
"testing/**",
375+
"examples/**"
376+
]
377+
},
378+
{
379+
"plugin": "@code-pushup/nx-plugin",
380+
"options": {
381+
"targetName": "code-pushup-jsdocs"
382+
},
383+
"exclude": [
384+
"packages/models",
385+
"packages/plugin-lighthouse",
386+
"tools/**",
387+
"testing/**",
388+
"examples/**"
389+
]
390+
},
391+
{
392+
"plugin": "@code-pushup/nx-plugin",
393+
"options": {
394+
"targetName": "code-pushup-js-packages"
395+
},
396+
"exclude": ["packages/**", "tools/**", "testing/**", "examples/**"]
397+
},
398+
{
399+
"plugin": "@code-pushup/nx-plugin",
400+
"options": {
401+
"targetName": "code-pushup-lighthouse"
402+
},
403+
"exclude": ["packages/**", "tools/**", "testing/**", "examples/**"]
404+
},
405+
{
406+
"plugin": "@code-pushup/nx-plugin",
407+
"options": {
408+
"targetName": "code-pushup-axe"
409+
},
410+
"exclude": ["packages/**", "tools/**", "testing/**", "examples/**"]
411+
},
349412
{
350413
"plugin": "@push-based/nx-verdaccio",
351414
"options": {

packages/ci/project.json

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,7 @@
77
"build": {},
88
"lint": {},
99
"unit-test": {},
10-
"int-test": {},
11-
"code-pushup": {},
12-
"code-pushup-eslint": {},
13-
"code-pushup-coverage": {},
14-
"code-pushup-typescript": {},
15-
"code-pushup-jsdocs": {}
10+
"int-test": {}
1611
},
1712
"tags": ["scope:tooling", "type:feature", "publishable"]
1813
}

0 commit comments

Comments
 (0)