How to use the browserify.plugin function in browserify

To help you get started, we’ve selected a few browserify examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github learningequality / studio / build.js View on Github external
  { // less options
    global: true,

    NODE_ENV: prod ? 'production' : 'development',
  { global: true }

if (watch) {
  var watchify = require('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);
github thlorenz / proxyquireify / lib / replace-prelude.js View on Github external
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);