Skip to content

Commit 9fda7b4

Browse files
committed
Breaking: Replace Orchestrator with Undertaker
1 parent f0942aa commit 9fda7b4

File tree

3 files changed

+5
-199
lines changed

3 files changed

+5
-199
lines changed

index.js

Lines changed: 4 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,13 @@
11
'use strict';
22

33
var util = require('util');
4-
var Orchestrator = require('orchestrator');
5-
var gutil = require('gulp-util');
6-
var deprecated = require('deprecated');
4+
var Undertaker = require('undertaker');
75
var vfs = require('vinyl-fs');
86

97
function Gulp() {
10-
Orchestrator.call(this);
8+
Undertaker.call(this);
119
}
12-
util.inherits(Gulp, Orchestrator);
13-
14-
Gulp.prototype.task = Gulp.prototype.add;
15-
Gulp.prototype.run = function() {
16-
// `run()` is deprecated as of 3.5 and will be removed in 4.0
17-
// Use task dependencies instead
18-
19-
// Impose our opinion of "default" tasks onto orchestrator
20-
var tasks = arguments.length ? arguments : ['default'];
21-
22-
this.start.apply(this, tasks);
23-
};
10+
util.inherits(Gulp, Undertaker);
2411

2512
Gulp.prototype.src = vfs.src;
2613
Gulp.prototype.dest = vfs.dest;
@@ -30,34 +17,11 @@ Gulp.prototype.watch = function(glob, opt, fn) {
3017
opt = null;
3118
}
3219

33-
// Array of tasks given
34-
if (Array.isArray(fn)) {
35-
return vfs.watch(glob, opt, function() {
36-
this.start.apply(this, fn);
37-
}.bind(this));
38-
}
39-
40-
return vfs.watch(glob, opt, fn);
20+
return vfs.watch(glob, opt, this.parallel(fn));
4121
};
4222

4323
// Let people use this class from our instance
4424
Gulp.prototype.Gulp = Gulp;
4525

46-
// Deprecations
47-
deprecated.field('gulp.env has been deprecated. ' +
48-
'Use your own CLI parser instead. ' +
49-
'We recommend using yargs or minimist.',
50-
console.warn,
51-
Gulp.prototype,
52-
'env',
53-
gutil.env
54-
);
55-
56-
Gulp.prototype.run = deprecated.method('gulp.run() has been deprecated. ' +
57-
'Use task dependencies or gulp.watch task triggering instead.',
58-
console.warn,
59-
Gulp.prototype.run
60-
);
61-
6226
var inst = new Gulp();
6327
module.exports = inst;

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,9 @@
2323
},
2424
"man": "gulp.1",
2525
"dependencies": {
26-
"deprecated": "^0.0.1",
2726
"gulp-cli": "^0.1.3",
2827
"gulp-util": "^3.0.0",
29-
"orchestrator": "^0.3.0",
28+
"undertaker": "^0.1.0",
3029
"vinyl-fs": "^0.3.0"
3130
},
3231
"devDependencies": {

test/tasks.js

Lines changed: 0 additions & 157 deletions
This file was deleted.

0 commit comments

Comments
 (0)