Last active
November 20, 2015 02:44
-
-
Save danieltorscho/aabb9be6a9f9fe4be44b to your computer and use it in GitHub Desktop.
Gulp boilerplate - Elixir Asset Management for Laravel 5
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
// Toggle notification popups for IO in OS | |
process.env.DISABLE_NOTIFIER = true; | |
// Dependencies | |
var elixir = require('laravel-elixir'); | |
var gulp = require('gulp'); | |
// Laravel Elixir Replace | |
// require('laravel-elixir-replace'); // optional installation | |
// Toggle Elixir source maps generation | |
elixir.config.sourcemaps = true; | |
elixir(function (mix) { | |
// Copy LESS and CSS | |
mix.less('frontend.less', 'resources/assets/css/frontend.css'); | |
mix.styles( | |
// Grab multiple file styles | |
[ | |
//'frontstrap.css', | |
'frontend.css' | |
], | |
// And merge them into the one in public folder | |
'public/assets/css/frontend.css'); | |
// Copy bower components into the public folder | |
mix.copy('vendor/bower_components/font-awesome/fonts', 'public/assets/fonts'); | |
// Copy libs and plugins into local assets | |
mix.copy('vendor/bower_components/jquery/dist/jquery.js', 'resources/assets/js/jquery.js'); | |
mix.copy('vendor/bower_components/bootstrap/dist/js/bootstrap.js', 'resources/assets/js/bootstrap.js'); | |
mix.copy('vendor/bower_components/classie/classie.js', 'resources/assets/js/classie.js'); | |
// Combine bower scripts and generate appstrap script | |
mix.scripts(['jquery.js', 'bootstrap.js', 'classie.js'], 'public/assets/js/appstrap.js'); | |
// Combine local scripts and generate frontstrap | |
mix.scripts(['template.js'], 'public/assets/js/frontstrap.js'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment