forked from gulpjs/gulp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
29 lines (28 loc) · 715 Bytes
/
index.js
File metadata and controls
29 lines (28 loc) · 715 Bytes
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
module.exports = gulp = {
reset: function() {
gulp.tasks = {};
return this;
},
tasks: {},
task: function(name, fn) {
gulp.tasks[name] = fn;
return this;
},
run: function() {
var tasks = [].slice.call(arguments, 0);
tasks.forEach(function(name) {
var fn = gulp.tasks[name];
if (!fn) {
throw new Error("No task named \"" + name + "\"");
}
fn.call(gulp);
});
return this;
},
files: require('./lib/createFilesStream'),
file: require('./lib/createFileStream'),
folder: require('./lib/createFolderStream'),
watch: require('./lib/watchFile'),
createGlobStream: require('glob-stream').create,
readFile: require('./lib/readFile')
};