Include the less glob plugin so less files can be imported using wildcards

This commit is contained in:
Kevin MacMartin 2015-11-30 23:40:49 -05:00
parent edd8c6f98d
commit 7f04d74047
2 changed files with 14 additions and 5 deletions

View file

@ -1,14 +1,19 @@
process.env.DISABLE_NOTIFIER = true;
var gulp = require("gulp");
var elixir = require('laravel-elixir');
var gulp = require("gulp"),
elixir = require('laravel-elixir'),
lessglob = require('less-plugin-glob');
// require livereload when not production
if (!elixir.config.production)
require('laravel-elixir-livereload');
// autoprefixer settings
elixir.config.autoprefix = { remove: false, cascade: false, browsers: ['last 2 versions'] };
elixir.config.autoprefix = {
remove: false,
cascade: false,
browsers: ['last 2 versions']
};
// javascript files in resources/assets/js/
var jsLocal = [
@ -30,7 +35,10 @@ var lessPaths = [
elixir(function(mix) {
// elixir mix functions
mix.copy('bower_components/bootstrap/dist/fonts/bootstrap/**', 'public/fonts')
.less('app.less', 'public/css/app.css', { paths: lessPaths })
.less('app.less', 'public/css/app.css', {
paths: lessPaths,
plugins: [lessglob]
})
.scripts(jsLocal, 'public/js/app.js', 'resources/assets/js/')
.scripts(jsBower, 'public/js/lib.js', 'bower_components/')
.version(['css/app.css', 'js/app.js', 'js/lib.js']);

View file

@ -5,6 +5,7 @@
},
"dependencies": {
"gulp": "^3.9.0",
"laravel-elixir": "^4.0.0"
"laravel-elixir": "^4.0.0",
"less-plugin-glob": "^1.1.1"
}
}