How to use the browserify.transform 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
// now that we've collected the bundle modules we need, set up browserify
var browserify = browserify({
  paths: modulePaths,
  cache: {},
  packageCache: {},
  debug: true,
});

// all the files are being included inplicitly by watching the modules we hand-write
_.each(bundles,
  function(item) {
    browserify.add(item.bundle, {expose: item.alias});
  }
);

browserify.transform(vueify);
// handlebars translation
browserify.transform(hbsfy);

browserify.transform(babelify);

// less translation
browserify.transform(lessify,
  { // less options
    global: true,
  }
);

browserify.transform(
  envify({
    NODE_ENV: prod ? 'production' : 'development',
  }),
github learningequality / studio / build.js View on Github external
paths: modulePaths,
  cache: {},
  packageCache: {},
  debug: true,
});

// all the files are being included inplicitly by watching the modules we hand-write
_.each(bundles,
  function(item) {
    browserify.add(item.bundle, {expose: item.alias});
  }
);

browserify.transform(vueify);
// handlebars translation
browserify.transform(hbsfy);

browserify.transform(babelify);

// less translation
browserify.transform(lessify,
  { // less options
    global: true,
  }
);

browserify.transform(
  envify({
    NODE_ENV: prod ? 'production' : 'development',
  }),
  { global: true }
);
github learningequality / studio / build.js View on Github external
);

browserify.transform(vueify);
// handlebars translation
browserify.transform(hbsfy);

browserify.transform(babelify);

// less translation
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/**',
    }
  );
github learningequality / studio / build.js View on Github external
packageCache: {},
  debug: true,
});

// all the files are being included inplicitly by watching the modules we hand-write
_.each(bundles,
  function(item) {
    browserify.add(item.bundle, {expose: item.alias});
  }
);

browserify.transform(vueify);
// handlebars translation
browserify.transform(hbsfy);

browserify.transform(babelify);

// less translation
browserify.transform(lessify,
  { // less options
    global: true,
  }
);

browserify.transform(
  envify({
    NODE_ENV: prod ? 'production' : 'development',
  }),
  { global: true }
);

if (watch) {
github learningequality / studio / build.js View on Github external
// all the files are being included inplicitly by watching the modules we hand-write
_.each(bundles,
  function(item) {
    browserify.add(item.bundle, {expose: item.alias});
  }
);

browserify.transform(vueify);
// handlebars translation
browserify.transform(hbsfy);

browserify.transform(babelify);

// less translation
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