Skip to content

Instantly share code, notes, and snippets.

@aguimaraes
Created January 14, 2016 12:05
Show Gist options
  • Select an option

  • Save aguimaraes/bbc20de8ac38eaea3d58 to your computer and use it in GitHub Desktop.

Select an option

Save aguimaraes/bbc20de8ac38eaea3d58 to your computer and use it in GitHub Desktop.
var elixir = require('laravel-elixir'),
fs = require('fs'),
assetsPath = './resources/assets/',
bowerPath = assetsPath + 'bower/',
cssPath = assetsPath + 'css/';
elixir(function(mix) {
var cssLibraries = [
bowerPath + 'bootstrap/dist/css/bootstrap.min.css',
bowerPath + 'font-awesome/css/font-awesome.min.css',
bowerPath + 'Ionicons/css/ionicons.min.css',
bowerPath + 'AdminLTE/dist/css/AdminLTE.min.css',
bowerPath + 'AdminLTE/dist/css/skins/skin-black-light.css',
bowerPath + 'iCheck/skins/flat/blue.css',
bowerPath + 'morris.js/morris.css',
bowerPath + 'AdminLTE/plugins/jvectormap/jquery-jvectormap-1.2.2.css',
bowerPath + 'bootstrap-datepicker/dist/css/bootstrap-datepicker3.min.css',
];
fs.access(cssPath + '000-processed.css', function(err) {
// if libraries are already combined I don't neet to do it again
if (!err) {
console.log('I will *NOT* combine pre-compiled CSS.');
return;
}
console.log('I will combine pre-compiled CSS.');
mix.combine(cssLibraries, cssPath + '000-processed.css');
});
mix.sass('**', cssPath + '001-sass.css');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment