New Features in grunt-timer v0.3

New features of “grunt-timer”

I’m pleased to announce the v0.3 release of grunt-timer! The best part about this release is that it’s entirely down to the efforts of the open source community.

What’s new

There are 3 new features, implemented as interchangeable options:

friendlyTime

Initialising grunt-timer with this option outputs durations in a friendly hours/minutes/seconds format (as opposed to just milliseconds, which is the default). e.g:

1
2
module.exports = function (grunt) {
timer.init(grunt, { friendlyTime: true });

deferLogs

Initialising grunt-timer with this option outputs a summary of all task timings at the end of the grunt process (as opposed to between tasks, which is the default). e.g:

1
2
module.exports = function (grunt) {
timer.init(grunt, { deferLogs: true });

deferLogs can be used in conjunction with friendlyTime.

1
2
module.exports = function (grunt) {
timer.init(grunt, { friendlyTime: true, deferLogs: true });

totalOnly

Initialising grunt-timer with this option only the total time all tasks took to complete. This is useful for having many small, insignificant tasks that would generate considerable output even with deferLogs. e.g:

1
2
module.exports = function (grunt) {
timer.init(grunt, { totalOnly: true });

totalOnly can be used in conjunction with friendlyTime.

1
2
module.exports = function (grunt) {
timer.init(grunt, { friendlyTime: true, totalOnly: true });

Credits

Contributors

  • Thanks to Dave Cadwallader for the implementation of the friendlyTime and deferLogs options.
  • Thanks to Carl Herbst for the implementation of the totalOnly option.

Pull requests

The full source code is available here and you can create pull requests here.