forEach is synchronous so you can just call done() once it's done.
The current logic was kinda broken since it increments countdown to 1 then decrements it to 0 then if it's 0 it calls done, and it does that at every iteration so it calls done too many times and breaks any following async task in the grunt pipeline.
forEach is synchronous so you can just call done() once it's done.
The current logic was kinda broken since it increments countdown to 1 then decrements it to 0 then if it's 0 it calls done, and it does that at every iteration so it calls done too many times and breaks any following async task in the grunt pipeline.