50
rated 0 times
[
54]
[
4]
/ answers: 1 / hits: 5795
/ 11 Years ago, fri, november 29, 2013, 12:00:00
Once a Grunt task completes, I want to print out some information. See the Grunt snippet below.
Is there a way to achieve this? I noticed that grunt.task.run()
does not support callbacks. This causes my message to be printed out prior to coverage report output.
grunt.registerTask('coverage', 'Runs all unit tests available via Mocha and generates code coverage report', function() {
grunt.task.run('env:unitTest', 'mochaTest');
grunt.log.writeln('Code coverage report was generated into build/coverage.html');
});
I also want to avoid hacks such as creating a grunt task only for printing the information out and adding it to the grunt.task.run()
chain of tasks.
More From » node.js