Simple extension to laravel elixir to build javascript bundle with browserify.
npm install --save-dev laravel-elixir-browserify
var elixir = require('laravel-elixir');
require('laravel-elixir-browserify');
elixir(function(mix) {
mix.browserify("bootstrap.js");
});
First argument is the entry point of your application (default directory is resources/assets/js). In second argument you could pass plugin options and browserify options.
var elixir = require('laravel-elixir');
require('laravel-elixir-browserify');
elixir(function(mix) {
mix.browserify("bootstrap.js", {
debug: true,
insertGlobals: true,
transform: ["debowerify"],
output: "public/js",
rename: "bundle.js"
});
});
0.6.0
- Removed second argument (destination directory) and add output option.
- Fixed browserify transforms (vinyl-transform replaced by vinyl-source-stream and vinyl-buffer)
0.5.0
- Default bundle file has the same name as input file. Use rename option to change it.
0.4.1
- Renamed the helpers folder to commands
0.4.0
- Replace blacklisted gulp-browserify with browserify and vinyl-transform packages (thanks for @JoeCianflone).
- Removed default debowerify transform.