Skip to content

Instantly share code, notes, and snippets.

@ericlbarnes
Created January 17, 2015 03:33
Show Gist options
  • Star 37 You must be signed in to star a gist
  • Fork 5 You must be signed in to fork a gist
  • Save ericlbarnes/c3ab73520bae8f1a83a2 to your computer and use it in GitHub Desktop.
Save ericlbarnes/c3ab73520bae8f1a83a2 to your computer and use it in GitHub Desktop.
Laravel Elixir With Bootstrap Sass
{
"directory": "vendor/bower_components"
}
{
"name": "Laravel Application",
"dependencies": {
"bootstrap-sass-official": "~3.3.1"
}
}
var elixir = require('laravel-elixir');
/*
|----------------------------------------------------------------
| Have a Drink!
|----------------------------------------------------------------
|
| Elixir provides a clean, fluent API for defining some basic
| Gulp tasks for your Laravel application. Elixir supports
| several common CSS, JavaScript and even testing tools!
|
*/
var paths = {
'jquery': './vendor/bower_components/jquery/',
'bootstrap': './vendor/bower_components/bootstrap-sass-official/assets/'
}
elixir(function(mix) {
mix.sass("style.scss", 'public/css/', {includePaths: [paths.bootstrap + 'stylesheets/']})
.copy(paths.bootstrap + 'fonts/bootstrap/**', 'public/fonts')
.scripts([
paths.jquery + "dist/jquery.js",
paths.bootstrap + "javascripts/bootstrap.js"
], './', 'public/js/app.js');
});
@lukasmalkmus
Copy link

@ericbarnes Your new article about including bootstrap -sass is great! I just tried it, because my way of including front-end dependencies was... well.... shit :) However, I'm still curious if there is a way to implement font-awsome in a similar fashion (with npm). Or do I need to stick with bower?

@mahmoudfci93
Copy link

after that installation ,how can i include bootstrap template into my application??

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment