13.0.0 • Published 10 years ago

gobble-browserify v13.0.0

Weekly downloads
8
License
MIT
Repository
github
Last release
10 years ago

gobble-browserify

Bundle CommonJS modules with gobble and Browserify

Installation

First, you need to have gobble installed - see the gobble readme for details. Then,

npm i -D gobble-browserify

Usage

Given a file src/js/app.js that includes browserify-type require() statements in it:

var gobble = require( 'gobble' );
module.exports = gobble( 'src' ).transform( 'browserify', {
  // Files to include, relative to `src`. Can be string or array
  entries: './js/app.js',

  // The file that will be generated
  dest: 'bundle.js',

  // Whether to generate sourcemaps (defaults to true)
  debug: false,

  // If supplied, this function will be called with the
  // bundle object for advanced configuration, e.g. transforms
  configure: function ( bundle ) {
    /* do stuff here */
  },

  // `ignore` and `exclude` will be applied to the bundle,
  // you don't have to use `configure`. Can be string or array
  ignore: 'foo',

  // this allows you to specify a particular file to use for a
  // given module, rather than using the normal resolution
  // algorithm. For example, to use the legacy version of
  // Ractive.js instead of the default...
  expose: {
    ractive: 'ractive/ractive-legacy.js'
  }

  // all other options are passed straight through to browserify
});

License

MIT. Copyright 2014 Rich Harris

13.0.0

10 years ago

0.6.1

11 years ago

0.6.0

11 years ago

0.5.0

11 years ago

0.4.0

11 years ago

0.3.0

11 years ago

0.2.0

11 years ago

0.1.0

11 years ago