Skip to content

Commit 210a9e5

Browse files
author
John Doe
committed
refactor: adjust nx.json
1 parent cfb8a2f commit 210a9e5

File tree

1 file changed

+64
-40
lines changed

1 file changed

+64
-40
lines changed

nx.json

Lines changed: 64 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,7 @@
22
"$schema": "./node_modules/nx/schemas/nx-schema.json",
33
"namedInputs": {
44
"default": ["{projectRoot}/**/*", "sharedGlobals"],
5-
"os": [
6-
{
7-
"runtime": "node -e \"console.log(require('os').platform())\""
8-
}
9-
],
5+
"os": [{ "runtime": "node -e \"console.log(require('os').platform())\"" }],
106
"production": [
117
"default",
128
"!{projectRoot}/README.md",
@@ -29,42 +25,23 @@
2925
],
3026
"test-vitest-inputs": [
3127
"os",
32-
{
33-
"env": "NX_VERBOSE_LOGGING"
34-
},
35-
{
36-
"externalDependencies": ["vitest"]
37-
}
28+
{ "env": "NX_VERBOSE_LOGGING" },
29+
{ "externalDependencies": ["vitest"] }
3830
],
3931
"lint-eslint-inputs": [
4032
"{workspaceRoot}/eslint.config.js",
41-
{
42-
"externalDependencies": ["eslint"]
43-
}
33+
{ "externalDependencies": ["eslint"] }
4434
],
4535
"typecheck-typescript-inputs": [
4636
"{workspaceRoot}/tsconfig.base.json",
47-
{
48-
"externalDependencies": ["typescript"]
49-
}
37+
{ "externalDependencies": ["typescript"] }
5038
],
5139
"code-pushup-inputs": [
5240
"{workspaceRoot}/code-pushup.preset.ts",
53-
{
54-
"env": "NODE_OPTIONS"
55-
},
56-
{
57-
"env": "TSX_TSCONFIG_PATH"
58-
}
41+
{ "env": "NODE_OPTIONS" },
42+
{ "env": "TSX_TSCONFIG_PATH" }
5943
],
60-
"sharedGlobals": [
61-
{
62-
"runtime": "node -v"
63-
},
64-
{
65-
"runtime": "npm -v"
66-
}
67-
]
44+
"sharedGlobals": [{ "runtime": "node -v" }, { "runtime": "npm -v" }]
6845
},
6946
"targetDefaults": {
7047
"lint": {
@@ -148,11 +125,17 @@
148125
"cache": false,
149126
"dependsOn": ["code-pushup-*"],
150127
"options": {
151-
"command": "autorun",
128+
"projectPrefix": "cli",
152129
"config": "{projectRoot}/code-pushup.config.ts",
153130
"persist": {
154131
"outputDir": ".code-pushup/{projectName}"
155132
}
133+
},
134+
"configurations": {
135+
"print-config": {
136+
"command": "print-config",
137+
"output": "{projectRoot}/code-pushup.config.json"
138+
}
156139
}
157140
},
158141
"code-pushup-coverage": {
@@ -332,28 +315,49 @@
332315
{
333316
"plugin": "@code-pushup/nx-plugin",
334317
"options": {
335-
"targetName": "code-pushup"
318+
"targetName": "code-pushup",
319+
"bin": "packages/cli/src/index.ts",
320+
"projectPrefix": "cli",
321+
"env": {
322+
"NODE_OPTIONS": "--import tsx",
323+
"TSX_TSCONFIG_PATH": "tsconfig.base.json"
324+
}
336325
},
337326
"exclude": ["tools/**", "testing/**", "examples/**"]
338327
},
339328
{
340329
"plugin": "@code-pushup/nx-plugin",
341330
"options": {
342-
"targetName": "code-pushup-coverage"
331+
"targetName": "code-pushup-coverage",
332+
"bin": "packages/cli/src/index.ts",
333+
"env": {
334+
"NODE_OPTIONS": "--import tsx",
335+
"TSX_TSCONFIG_PATH": "tsconfig.base.json"
336+
}
343337
},
344338
"exclude": ["tools/**", "testing/**", "examples/**"]
345339
},
346340
{
347341
"plugin": "@code-pushup/nx-plugin",
348342
"options": {
349-
"targetName": "code-pushup-eslint"
343+
"targetName": "code-pushup-eslint",
344+
"bin": "packages/cli/src/index.ts",
345+
"env": {
346+
"NODE_OPTIONS": "--import tsx",
347+
"TSX_TSCONFIG_PATH": "tsconfig.base.json"
348+
}
350349
},
351350
"exclude": ["testing/**", "examples/**"]
352351
},
353352
{
354353
"plugin": "@code-pushup/nx-plugin",
355354
"options": {
356-
"targetName": "code-pushup-typescript"
355+
"targetName": "code-pushup-typescript",
356+
"bin": "packages/cli/src/index.ts",
357+
"env": {
358+
"NODE_OPTIONS": "--import tsx",
359+
"TSX_TSCONFIG_PATH": "tsconfig.base.json"
360+
}
357361
},
358362
"exclude": [
359363
"packages/models/**",
@@ -367,7 +371,12 @@
367371
{
368372
"plugin": "@code-pushup/nx-plugin",
369373
"options": {
370-
"targetName": "code-pushup-jsdocs"
374+
"targetName": "code-pushup-jsdocs",
375+
"bin": "packages/cli/src/index.ts",
376+
"env": {
377+
"NODE_OPTIONS": "--import tsx",
378+
"TSX_TSCONFIG_PATH": "tsconfig.base.json"
379+
}
371380
},
372381
"exclude": [
373382
"packages/models",
@@ -380,21 +389,36 @@
380389
{
381390
"plugin": "@code-pushup/nx-plugin",
382391
"options": {
383-
"targetName": "code-pushup-js-packages"
392+
"targetName": "code-pushup-js-packages",
393+
"bin": "packages/cli/src/index.ts",
394+
"env": {
395+
"NODE_OPTIONS": "--import tsx",
396+
"TSX_TSCONFIG_PATH": "tsconfig.base.json"
397+
}
384398
},
385399
"exclude": ["packages/**", "tools/**", "testing/**", "examples/**"]
386400
},
387401
{
388402
"plugin": "@code-pushup/nx-plugin",
389403
"options": {
390-
"targetName": "code-pushup-lighthouse"
404+
"targetName": "code-pushup-lighthouse",
405+
"bin": "packages/cli/src/index.ts",
406+
"env": {
407+
"NODE_OPTIONS": "--import tsx",
408+
"TSX_TSCONFIG_PATH": "tsconfig.base.json"
409+
}
391410
},
392411
"exclude": ["packages/**", "tools/**", "testing/**", "examples/**"]
393412
},
394413
{
395414
"plugin": "@code-pushup/nx-plugin",
396415
"options": {
397-
"targetName": "code-pushup-axe"
416+
"targetName": "code-pushup-axe",
417+
"bin": "packages/cli/src/index.ts",
418+
"env": {
419+
"NODE_OPTIONS": "--import tsx",
420+
"TSX_TSCONFIG_PATH": "tsconfig.base.json"
421+
}
398422
},
399423
"exclude": ["packages/**", "tools/**", "testing/**", "examples/**"]
400424
},

0 commit comments

Comments
 (0)