Skip to content

Commit 6deb0dd

Browse files
committed
Merge pull request gulpjs#41 from robrich/master
upgrade Orchestrator to 0.2.0 and use hrDuration -- a process.hrtime()
2 parents b54d56d + be3c92c commit 6deb0dd

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

index.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
var util = require('util');
66
var Orchestrator = require('orchestrator');
77
var gutil = require('gulp-util');
8+
var prettyTime = require('pretty-hrtime');
89

910
// format orchestrator errors
1011
var formatError = function(e) {
@@ -22,14 +23,14 @@ function Gulp(){
2223
gutil.log('Running', "'"+gutil.colors.cyan(e.task)+"'...");
2324
});
2425
this.on('task_stop', function(e){
25-
var time = gutil.prettyTime(e.duration);
26-
gutil.log('Finished', "'"+gutil.colors.cyan(e.task)+"'", "in", gutil.colors.magenta(time.value), time.shortUnit);
26+
var time = prettyTime(e.hrDuration);
27+
gutil.log('Finished', "'"+gutil.colors.cyan(e.task)+"'", "in", gutil.colors.magenta(time));
2728
});
2829

2930
this.on('task_err', function(e){
3031
var msg = formatError(e);
31-
var time = gutil.prettyTime(e.duration);
32-
gutil.log('Errored', "'"+gutil.colors.cyan(e.task)+"'", "in", gutil.colors.magenta(time.value), time.shortUnit, gutil.colors.red(msg));
32+
var time = prettyTime(e.hrDuration);
33+
gutil.log('Errored', "'"+gutil.colors.cyan(e.task)+"'", "in", gutil.colors.magenta(time), gutil.colors.red(msg));
3334
});
3435
}
3536
util.inherits(Gulp, Orchestrator);

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,11 @@
2222
"optimist": "~0.6.0",
2323
"gulp-util": "~1.2.0",
2424
"gaze": "~0.4.3",
25-
"orchestrator": "~0.1.0",
25+
"orchestrator": "~0.2.0",
2626
"resolve": "~0.6.1",
2727
"semver": "~2.2.1",
28-
"findup-sync": "~0.1.2"
28+
"findup-sync": "~0.1.2",
29+
"pretty-hrtime": "~0.2.0"
2930
},
3031
"devDependencies": {
3132
"mocha": "*",

0 commit comments

Comments
 (0)