As soon as the Grunt task completes, I want to print some information. See the Grunt snippet below.
Is there any way to achieve this? I noticed that grunt.task.run() does not support callbacks. This causes my message to be printed before the coverage report.
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 to print out information and add it to the grunt.task.run() task chain.
Pavel Lobodinský
source share