coldbox-elixir-browserify

1.0.1 • Public • Published

ColdBox Elixir Browserify Support

Step 1: Install

First ensure, that you're ColdBox Elixir version is up to date. It should be at least version 2 or newer.

npm install coldBox-elixir-browserify --save-dev

Step 2: Use It

// Gulpfile.js
 
var elixir = require( "coldBox-elixir" );
 
elixir( function( mix ) {
    mix.browserify( "main.js" );
    // mix.browserify(srcPath, outputPath, srcBaseDir, browserifyOptions)
} );

This will compile, by default, resources/assets/js/main.js to includes/js/main.js. Should you require a different source directory, either provide an optional path as the third argument to mix.browserify, or begin your path with ./. This will instruct Elixir to ignore any default base directories.

elixir( function( mix ) {
    mix.browserify( "./app/assets/js/main.js" );
} );

The same is true for the output path.

elixir( function( mix ) {
    mix.browserify( "./app/assets/js/main.js", "public/build/bundle.js" );
} );

That's it! Refer to the ColdBox Elixir documentation for more details.

Package Sidebar

Install

npm i coldbox-elixir-browserify

Weekly Downloads

1

Version

1.0.1

License

MIT

Last publish

Collaborators

  • bdw429s
  • elpete
  • lmajano