Skip to content

Instantly share code, notes, and snippets.

@leantony
Created July 17, 2016 19:17
Show Gist options
  • Save leantony/04018b0fe7574103235f632872d20e20 to your computer and use it in GitHub Desktop.
Save leantony/04018b0fe7574103235f632872d20e20 to your computer and use it in GitHub Desktop.
sample gulpfile, with assets in vendor/bower
var elixir = require('laravel-elixir');
/*
|--------------------------------------------------------------------------
| Elixir Asset Management
|--------------------------------------------------------------------------
|
| Elixir provides a clean, fluent API for defining some basic Gulp tasks
| for your Laravel application. By default, we are compiling the Sass
| file for our application, as well as publishing vendor resources.
|
*/
// bower dir
var vendorAssetsRoot = "vendor/bower";
/**
* SASS
*/
elixir(function(mix) {
mix.sass('custom.scss', 'public/assets/css/custom.css');
});
/**
* STYLESHEETS
*/
elixir(function(mix){
// styles
mix.styles([
// bootstrap
"bootstrap/dist/css/bootstrap.css",
// animate
"animate.css/animate.css",
// font awesome
"font-awesome/css/font-awesome.css",
// nprogress
"nprogress/nprogress.css"
], "public/assets/css/libs.css", vendorAssetsRoot);
});
/**
* STATIC ASSETS (COPY)
*/
elixir(function (mix) {
// FONTS
mix.copy(vendorAssetsRoot + '/font-awesome/fonts', 'public/assets/fonts');
mix.copy(vendorAssetsRoot + '/bootstrap/fonts', 'public/assets/fonts');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment