I received a grunt setup and one of the new tasks should execute (grunt.task.run) already existing task. The task to execute is asynchronous, and the new task should wait until the async task has finished.
What is the preferred way to do this?
I received a grunt setup and one of the new tasks should execute (grunt.task.run) already existing task. The task to execute is asynchronous, and the new task should wait until the async task has finished.
What is the preferred way to do this?
grunt already got this covered, you should declare your task as an async one, and use the done() func in your task to tell grunt that it is done, look at this repo and this article, that have been very helpfull to me when I first had to deal with async tasks.
without a glimpse at your gruntfile, this is all i could say, but fell free to update your post with a link to the grunfile :)