Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
{ global: true }
);
if (watch) {
var watchify = require('watchify');
browserify.plugin(watchify,
{ // watchify options
verbose: true,
poll: 1000,
ignoreWatch: '**/node_modules/**',
}
);
infoLog('Starting watcher');
browserify.on('update', function (ids) {
infoLog('files changed, bundle updated');
_.each(ids, function(id) {infoLog(id + ' changed');});
createBundles(browserify, bundles);
});
browserify.on('log', infoLog);
browserify.on('error', function(error) {
errLog(error);
this.emit('end');
});
}
createBundles(browserify, bundles);
{ // watchify options
verbose: true,
poll: 1000,
ignoreWatch: '**/node_modules/**',
}
);
infoLog('Starting watcher');
browserify.on('update', function (ids) {
infoLog('files changed, bundle updated');
_.each(ids, function(id) {infoLog(id + ' changed');});
createBundles(browserify, bundles);
});
browserify.on('log', infoLog);
browserify.on('error', function(error) {
errLog(error);
this.emit('end');
});
}
createBundles(browserify, bundles);
poll: 1000,
ignoreWatch: '**/node_modules/**',
}
);
infoLog('Starting watcher');
browserify.on('update', function (ids) {
infoLog('files changed, bundle updated');
_.each(ids, function(id) {infoLog(id + ' changed');});
createBundles(browserify, bundles);
});
browserify.on('log', infoLog);
browserify.on('error', function(error) {
errLog(error);
this.emit('end');
});
}
createBundles(browserify, bundles);