@@ -49,17 +49,9 @@ export default {
4949 "coverage.reportsDirectory" : " {projectRoot}/coverage/unit-test"
5050 }
5151 },
52- "code-pushup-js-packages" : {
53- "cache" : false ,
54- "executor" : " nx:run-commands" ,
55- "options" : {
56- "command" : " npx @code-pushup/cli collect" ,
57- "args" : [" --config={projectRoot}/code-pushup.config.ts" , " --cache.write=true" , " --persist.skipReports=true" , " --persist.outputDir={projectRoot}/.code-pushup" , " --upload.project={projectName}" ]
58- }
59- },
6052 "code-pushup-coverage" : {
6153 "cache" : true ,
62- "outputs" : [" {projectRoot}/.code-pushup/coverage/runner-output.json " ],
54+ "outputs" : [" {projectRoot}/.code-pushup/coverage" ],
6355 "executor" : " nx:run-commands" ,
6456 "options" : {
6557 "command" : " npx @code-pushup/cli collect" ,
@@ -69,13 +61,13 @@ export default {
6961 },
7062 "code-pushup" : {
7163 "cache" : true ,
72- "outputs" : [" {projectRoot}/.code-pushup/report.* " ],
64+ "outputs" : [" {projectRoot}/.code-pushup" ],
7365 "executor" : " nx:run-commands" ,
7466 "options" : {
7567 "command" : " npx @code-pushup/cli" ,
7668 "args" : [" --config={projectRoot}/code-pushup.config.ts" , " --cache.read=true" , " --persist.outputDir={projectRoot}/.code-pushup" , " --upload.project={projectName}" ]
7769 },
78- "dependsOn" : [" code-pushup-coverage" , " code-pushup-js-packages " ]
70+ "dependsOn" : [" code-pushup-coverage" ]
7971 }
8072 }
8173}
@@ -88,14 +80,12 @@ This configuration creates the following task dependency graph:
8880** Legend:**
8981
9082- 🐳 = Cached target
91- - 💾 = Parallel execution
9283
9384``` mermaid
9485graph TD
95- A[lib-a:code-pushup 🐳] --> B[lib-a:code-pushup-coverage 💾🐳]
96- A --> C[lib-a:code-pushup-js-packages 💾]
97- B --> C[lib-a:unit-test 💾🐳]
98- B --> D[lib-a:int-test 💾🐳]
86+ A[lib-a:code-pushup 🐳] --> B[lib-a:code-pushup-coverage 🐳]
87+ B --> C[lib-a:unit-test 🐳]
88+ B --> D[lib-a:int-test 🐳]
9989```
10090
10191## Command Line Example
@@ -110,7 +100,7 @@ nx affected --target=code-pushup
110100
111101This approach has the following benefits:
112102
113- 1 . ** 💾 Parallel Execution** : Plugins can run in parallel
114- 2 . ** 🐳 Fine-grained Caching** : Code level cache invalidation enables usage of [ affected] ( https://nx.dev/recipes/affected-tasks ) command
103+ 1 . ** Parallel Execution** : Plugins can run in parallel
104+ 2 . ** Fine-grained Caching** : Code level cache invalidation enables usage of [ affected] ( https://nx.dev/recipes/affected-tasks ) command
1151053 . ** Dependency Management** : Leverage Nx task dependencies and its caching strategy
1161064 . ** Clear Separation** : Each plugin has its own target for better debugging and maintainability
0 commit comments