Let's say we have these modules:
Module "A" looks like this:
src
└── main
├── spaghetti
│ └── A.module
└── ts
└── A.ts
Module "B" looks like this:
src
└── main
├── spaghetti
│ └── B.module
└── ts
└── B.ts
Module A depends on module B.
The problem: if I change B.ts, module A will be rebuilt. Why? because the input of A's generateHeaders task is not only the B.module file, but the whole compiled module. Also generateHeaders will never create the same output twice, because the generated files contain a timestamp.
So the order of execution looks like this now:
- change
B.ts
- module B recompiles
- module A's
generateHeaders is triggered
- module A's
compileJs is triggered