time-grunt
Version:
Display the elapsed execution time of grunt tasks
61 lines (35 loc) • 1.25 kB
Markdown
Deprecated because Grunt is practically unmaintained. Move on to something better. This package will continue to work with Grunt v1, but it will not receive any updates.
---
> Display the elapsed execution time of [grunt](http://gruntjs.com) tasks

```
$ npm install --save-dev time-grunt
```
```js
// Gruntfile.js
module.exports = grunt => {
// require it at the top and pass in the grunt instance
require('time-grunt')(grunt);
grunt.initConfig();
}
```
If you want to collect the timing stats for your own use, pass in a callback:
```js
require('time-grunt')(grunt, (stats, done) => {
// do whatever you want with the stats
uploadReport(stats);
// be sure to let grunt know when to exit
done();
});
```
The `watch` task and tasks that take less than 1% of the total time are 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](https://sindresorhus.com)