Last active
August 29, 2015 14:08
-
-
Save ryantbrown/84138aaf2313e5e8467b to your computer and use it in GitHub Desktop.
Laravel Elixir Starter Gulpfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// paths | |
var combine_dir = 'resources/assets'; | |
var build_dir = 'resources/assets/build'; | |
var less_file = 'main'; | |
var less_output = combine_dir + '/css'; | |
// set scripts to combine | |
var scripts = [ | |
'vendor/jquery/jquery.js', | |
'js/main.js' | |
]; | |
// set styles to combine | |
// compiled less file should be last | |
var styles = [ | |
'vendor/normalize/normalize.css', | |
'css/'+less_file+'.css' | |
]; | |
// files to version (cache bust) | |
var version = [ | |
'css/all.css', | |
'js/all.js' | |
]; | |
// require elixir | |
var elixir = require('laravel-elixir'); | |
// mix ingredients | |
elixir(function(mix) { | |
mix.routes().events() | |
.less(less_file+'.less', less_output) | |
.styles(styles, combine_dir) | |
.scripts(scripts, combine_dir) | |
.version(version, build_dir); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment