Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
browserify.transform(lessify,
{ // less options
global: true,
}
);
browserify.transform(
envify({
NODE_ENV: prod ? 'production' : 'development',
}),
{ 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);
exports.browserify = function (files) {
console.error('You are setting up proxyquireify via the old API which will be deprecated in future versions.');
console.error('It is recommended to use it as a browserify-plugin instead - see the example in the README.');
return require('browserify')(files).plugin(plugin);
};