How can I define what o…

less than 1 minute read

How can I define, what outputs to include in nx-cache for a certain task?


You can define an outputs array in the architect: "architect": { "test": { "builder": "@nrwl/jest:jest", "outputs": ["coverage/libs/lib-name"], ... } }

cool :+1:

note I tried this after tobi suggested it with V8 and I don’t think it is implemented until nx cloud v9

thx, it works for me on 9.3.0

on that note: now I have to add this line to 50+ libs in our project manually, and tell my devs to also add this manually everytime they create a new lib in our workspace. What is the best practice here in order to have that automated. preferebly not “create a wrapper for lib schematic”

We’ve done it via workspace schematic

Hahah pretty much the exact conversation you and I had last week :joy:

Yes :sweat_smile:

But this solution is a wrapper… what if I already use 3rd party schematics which internally use the default lib schematic… I dont want to generate wrapper after wrapper

I think schematics need something like hooks, where I could automatically execute another schematic, when identifying a certain schematic has been executed

very true