install gulp to process code
This commit is contained in:
parent
24f6606c2c
commit
b6a3900ee2
1651 changed files with 253427 additions and 39 deletions
33
node_modules/glob-watcher/lib/normalize-args.js
generated
vendored
Normal file
33
node_modules/glob-watcher/lib/normalize-args.js
generated
vendored
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
'use strict';
|
||||
|
||||
var defaultOpts = {
|
||||
delay: 200,
|
||||
events: ['add', 'change', 'unlink'],
|
||||
ignored: [],
|
||||
ignoreInitial: true,
|
||||
queue: true,
|
||||
};
|
||||
|
||||
function normalizeArgs(glob, options, cb, next) {
|
||||
if (typeof options === 'function') {
|
||||
cb = options;
|
||||
options = {};
|
||||
}
|
||||
|
||||
var opts = Object.assign({}, defaultOpts, options);
|
||||
|
||||
if (!Array.isArray(opts.events)) {
|
||||
opts.events = [opts.events];
|
||||
}
|
||||
|
||||
if (Array.isArray(glob)) {
|
||||
// We slice so we don't mutate the passed globs array
|
||||
glob = glob.slice();
|
||||
} else {
|
||||
glob = [glob];
|
||||
}
|
||||
|
||||
return next(glob, opts, cb);
|
||||
}
|
||||
|
||||
module.exports = normalizeArgs;
|
||||
Loading…
Add table
Add a link
Reference in a new issue