Skip to content

Commit d403e19

Browse files
authoredJul 9, 2024··
ci: Improve Nx inputs (#757)
1 parent 42c9234 commit d403e19

File tree

1 file changed

+28
-30
lines changed

1 file changed

+28
-30
lines changed
 

‎nx.json

+28-30
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
"namedInputs": {
88
"sharedGlobals": [
99
"{workspaceRoot}/.nvmrc",
10-
"{workspaceRoot}/eslint.config.js",
1110
"{workspaceRoot}/package.json",
1211
"{workspaceRoot}/tsconfig.json"
1312
],
@@ -16,52 +15,51 @@
1615
"{projectRoot}/**/*",
1716
"!{projectRoot}/**/*.md"
1817
],
19-
"public": [
18+
"production": [
2019
"default",
21-
"{projectRoot}/build",
22-
"{projectRoot}/dist",
20+
"!{projectRoot}/tests/**/*",
2321
"!{projectRoot}/eslint.config.js"
2422
]
2523
},
2624
"targetDefaults": {
27-
"test:lib": {
28-
"dependsOn": ["^build"],
29-
"inputs": ["default", "^public"],
30-
"outputs": ["{projectRoot}/coverage"],
31-
"cache": true
25+
"test:format": {
26+
"cache": true,
27+
"inputs": ["{workspaceRoot}/**/*"]
28+
},
29+
"test:knip": {
30+
"cache": true,
31+
"inputs": ["{workspaceRoot}/**/*"]
32+
},
33+
"test:sherif": {
34+
"cache": true,
35+
"inputs": ["{workspaceRoot}/**/package.json"]
3236
},
3337
"test:eslint": {
38+
"cache": true,
39+
"dependsOn": ["^build"],
40+
"inputs": ["default", "^production", "{workspaceRoot}/eslint.config.js"]
41+
},
42+
"test:lib": {
43+
"cache": true,
3444
"dependsOn": ["^build"],
35-
"inputs": ["default", "^public"],
36-
"cache": true
45+
"inputs": ["default", "^production"],
46+
"outputs": ["{projectRoot}/coverage"]
3747
},
3848
"test:types": {
49+
"cache": true,
3950
"dependsOn": ["^build"],
40-
"inputs": ["default", "^public"],
41-
"cache": true
51+
"inputs": ["default", "^production"]
4252
},
4353
"build": {
54+
"cache": true,
4455
"dependsOn": ["^build"],
45-
"inputs": ["default", "^public"],
46-
"outputs": ["{projectRoot}/build", "{projectRoot}/dist"],
47-
"cache": true
56+
"inputs": ["production", "^production"],
57+
"outputs": ["{projectRoot}/build", "{projectRoot}/dist"]
4858
},
4959
"test:build": {
50-
"dependsOn": ["build"],
51-
"inputs": ["^public"],
52-
"cache": true
53-
},
54-
"test:knip": {
55-
"cache": true,
56-
"inputs": ["{workspaceRoot}/**/*"]
57-
},
58-
"test:format": {
59-
"cache": true,
60-
"inputs": ["{workspaceRoot}/**/*"]
61-
},
62-
"test:sherif": {
6360
"cache": true,
64-
"inputs": ["{workspaceRoot}/**/*"]
61+
"dependsOn": ["build"],
62+
"inputs": ["production"]
6563
}
6664
}
6765
}

0 commit comments

Comments
 (0)
Please sign in to comment.