-
-
Notifications
You must be signed in to change notification settings - Fork 31
/
index.js
47 lines (30 loc) · 1.08 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
'use strict';
var inherits = require('util').inherits;
var EventEmitter = require('events').EventEmitter;
var DefaultRegistry = require('undertaker-registry');
var tree = require('./lib/tree');
var task = require('./lib/task');
var series = require('./lib/series');
var lastRun = require('./lib/last-run');
var parallel = require('./lib/parallel');
var registry = require('./lib/registry');
var _getTask = require('./lib/get-task');
var _setTask = require('./lib/set-task');
function Undertaker(customRegistry) {
EventEmitter.call(this);
this._registry = new DefaultRegistry();
if (customRegistry) {
this.registry(customRegistry);
}
this._settle = (process.env.UNDERTAKER_SETTLE === 'true');
}
inherits(Undertaker, EventEmitter);
Undertaker.prototype.tree = tree;
Undertaker.prototype.task = task;
Undertaker.prototype.series = series;
Undertaker.prototype.lastRun = lastRun;
Undertaker.prototype.parallel = parallel;
Undertaker.prototype.registry = registry;
Undertaker.prototype._getTask = _getTask;
Undertaker.prototype._setTask = _setTask;
module.exports = Undertaker;