Skip to content

Commit 7c792f9

Browse files
committed
chore: move config into targets
1 parent 23d9f71 commit 7c792f9

File tree

1 file changed

+42
-19
lines changed

1 file changed

+42
-19
lines changed

nx.json

Lines changed: 42 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,32 @@
1717
},
1818
"unit-test": {
1919
"cache": true,
20+
"inputs": ["test-vitest-inputs"],
2021
"outputs": [
2122
"{workspaceRoot}/coverage/{projectName}/unit-tests/lcov.info"
2223
],
2324
"executor": "@nx/vite:test",
2425
"options": {
25-
"configFile": "{projectRoot}/vitest.unit.config.ts"
26+
"configFile": "{projectRoot}/vitest.unit.config.ts",
27+
"passWithNoTests": true,
28+
"watch": false,
29+
"coverage": {
30+
"enabled": true
31+
}
2632
}
2733
},
2834
"int-test": {
2935
"cache": true,
36+
"inputs": ["test-vitest-inputs"],
3037
"outputs": ["{workspaceRoot}/coverage/{projectName}/int-tests/lcov.info"],
3138
"executor": "@nx/vite:test",
3239
"options": {
33-
"configFile": "{projectRoot}/vitest.int.config.ts"
40+
"configFile": "{projectRoot}/vitest.int.config.ts",
41+
"passWithNoTests": true,
42+
"watch": false,
43+
"coverage": {
44+
"enabled": true
45+
}
3446
}
3547
},
3648
"e2e": {
@@ -57,14 +69,7 @@
5769
"nxv-pkg-install": {
5870
"parallelism": false
5971
},
60-
"@nx/vite:test": {
61-
"cache": true,
62-
"inputs": ["test-vitest-inputs"],
63-
"options": {
64-
"passWithNoTests": true,
65-
"watch": false
66-
}
67-
},
72+
"@nx/vite:test": {},
6873
"code-pushup": {
6974
"cache": false,
7075
"outputs": [
@@ -235,34 +240,52 @@
235240
"default",
236241
"!{projectRoot}/README.md",
237242
"!{projectRoot}/CHANGELOG.md",
238-
239243
"!{projectRoot}/perf/**/*",
240244
"!{projectRoot}/tools/**/*",
241245
"!{projectRoot}/zod2md.config.ts",
242246
"!{projectRoot}/eslint.config.?(c)js",
243247
"!{projectRoot}/code-pushup.config.?(*.).?(m)[jt]s",
244-
245248
"!{projectRoot}/@(test|mocks|mock)/**/*",
246249
"!{projectRoot}/**/?(*.)test.[jt]s?(x)?(.snap)",
247250
"!{projectRoot}/**/?(*.)mocks.[jt]s?(x)",
248251
"!{projectRoot}/**/?(*.)mock.[jt]s?(x)",
249252
"!{projectRoot}/vitest.@(unit|int|e2e).config.[jt]s",
250253
"!{projectRoot}/tsconfig.@(test|tools).json"
251254
],
252-
"test-vitest-inputs": ["default", { "externalDependencies": ["vitest"] }],
253-
"lint-eslint-inputs": ["default", { "externalDependencies": ["eslint"] }],
255+
"test-vitest-inputs": [
256+
"default",
257+
{
258+
"externalDependencies": ["vitest"]
259+
}
260+
],
261+
"lint-eslint-inputs": [
262+
"default",
263+
{
264+
"externalDependencies": ["eslint"]
265+
}
266+
],
254267
"typecheck-typescript-inputs": [
255268
"default",
256-
{ "externalDependencies": ["typescript"] }
269+
{
270+
"externalDependencies": ["typescript"]
271+
}
257272
],
258273
"code-pushup-inputs": [
259274
"default",
260-
{ "env": "NODE_OPTIONS" },
261-
{ "env": "TSX_TSCONFIG_PATH" }
275+
{
276+
"env": "NODE_OPTIONS"
277+
},
278+
{
279+
"env": "TSX_TSCONFIG_PATH"
280+
}
262281
],
263282
"sharedGlobals": [
264-
{ "runtime": "npm --version" },
265-
{ "runtime": "node --version" },
283+
{
284+
"runtime": "npm --version"
285+
},
286+
{
287+
"runtime": "node --version"
288+
},
266289
"!{workspaceRoot}/**/dist/**/*",
267290
"!{workspaceRoot}/**/(*.)coverage/**/*",
268291
"!{workspaceRoot}/**/.code-pushup/**/*"

0 commit comments

Comments
 (0)