Wait async grunt task to finish

2019-06-28 01:39发布

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?

1条回答
Evening l夕情丶
2楼-- · 2019-06-28 02:08

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 :)

查看更多
登录 后发表回答