Display the elapsed execution time of grunt tasks
$ npm i --save-dev @lodder/time-grunt
// Gruntfile.js
module.exports = grunt => {
// Require it at the top and pass in the grunt instance
require('@lodder/time-grunt')(grunt);
grunt.initConfig();
}
If you want to collect the timing stats for your own use, pass in a callback:
require('@lodder/time-grunt')(grunt, (stats, done) => {
// do whatever you want with the stats
uploadReport(stats);
// be sure to let grunt know when to exit
done();
});
- Run
grunt
with--no-color
to disable any colour indicators in the terminal
The watch
task is hidden to reduce clutter.
Run grunt with grunt --verbose
to see all tasks.
Run grunt with grunt --quiet
to quiet all tasks including time-grunt.
MIT © Sindre Sorhus