Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
var through = require('through2');
var path = require('path');
var chokidar = require('chokidar');
var fs = require('fs');
var watchProvider = chokidar;
var xtend = require('xtend');
var anymatch = require('anymatch');

Expand All @@ -19,6 +21,9 @@ function watchify (b, opts) {
var updating = false;

var wopts = {persistent: true};
if (opts.nativeWatch) {
watchProvider = fs;
}
if (opts.ignoreWatch) {
var ignored = opts.ignoreWatch !== true
? opts.ignoreWatch
Expand Down Expand Up @@ -158,7 +163,7 @@ function watchify (b, opts) {
};

b._watcher = function (file, opts) {
return chokidar.watch(file, opts);
return watchProvider.watch(file, opts);
};

return b;
Expand Down