#Laravel-Elixir-Wiredep
This Laravel Elixir extension allows you using wiredep.
First, install the module through npm:
$ npm install --save @killtw/laravel-elixir-wiredep
Next, add some config to your gulpfile.
var elixir = require('laravel-elixir');
require('@killtw/laravel-elixir-wiredep');
elixir(function(mix) {
mix..wiredep();
});
Then install your dependencies:
$ bower install jquery --save
Inset placeholders in your files:
<html>
<head>
<!-- bower:css -->
<!-- endbower -->
</head>
<body>
<!-- bower:js -->
<!-- endbower -->
</body>
</html>
That's it! You're all set to go!
This will scan your Bower dependencies on bower.json
and inject them in your files.
Wiredep will import your dependencies directly, so make sure your bower dependencies will install in public folder.
Just create a .bowerrc
file in the root of your project, like:
{
"directory" : "public/bower_components"
}
mix.wiredep({
baseDir: 'resources/',
src: ['**/*.php', '/**/*.+(sass|scss)', '**/*.less']
}, options);
*Note: options accepts all wiredep options.
baseDir
- the folder for your filessrc
- files for search