Skip to content

Commit 0c66069

Browse files
committed
Breaking: Replace chokidar as gulp.watch with glob-watcher wrapper
1 parent c3dbc10 commit 0c66069

File tree

2 files changed

+3
-15
lines changed

2 files changed

+3
-15
lines changed

index.js

+2-14
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
var util = require('util');
44
var Undertaker = require('undertaker');
55
var vfs = require('vinyl-fs');
6-
var chokidar = require('chokidar');
6+
var watch = require('glob-watcher');
77

88
function Gulp() {
99
Undertaker.call(this);
@@ -42,19 +42,7 @@ Gulp.prototype.watch = function(glob, opt, task) {
4242
fn = this.parallel(task);
4343
}
4444

45-
if (opt.ignoreInitial == null) {
46-
opt.ignoreInitial = true;
47-
}
48-
49-
var watcher = chokidar.watch(glob, opt);
50-
if (fn) {
51-
watcher
52-
.on('change', fn)
53-
.on('unlink', fn)
54-
.on('add', fn);
55-
}
56-
57-
return watcher;
45+
return watch(glob, opt, fn);
5846
};
5947

6048
// Let people use this class from our instance

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
},
2424
"man": "gulp.1",
2525
"dependencies": {
26-
"chokidar": "^1.2.0",
26+
"glob-watcher": "^3.0.0",
2727
"gulp-cli": "^1.0.0",
2828
"undertaker": "^0.15.0",
2929
"vinyl-fs": "^2.0.0"

0 commit comments

Comments
 (0)