laravel-elixir-bowerbundle
Concatenates and publishes Bower dependencies as configurable bundles of .css and .js files.
This is a plugin for Laravel's Elixir build tool and provides the bower()
method.
;
Install from npm
npm install laravel-elixir-bowerbundle --save
Usage
// gulpfile.jsvar elixir = ;; ;
Specify which files you want from a package
Bower packages have a bower.json
file with a "main" property. This is how we know which
files from each package should be included in the bundle. You can override this in your
own bower.json
with an "overrides" property.
Example: the bootstrap bower package lists bootstrap.less
as one of its main files.
To get the compiled CSS instead, override the "main" property for the "bootstrap" package.
Use your own build pipeline
Is the standard mix.bower()
task not quite right for you? You can still use this package to
fetch the list of files for a bundle, then pass them to gulp.src()
in your own custom gulp task. For example:
// gulpfile.jsvar elixir = ;var bundle = ;var gulp = ; // Use elixir as normal, remembering to call your custom task; // Define your custom taskgulp;
Contributing
All contributions welcome.
License
MIT