Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Install sass version of twitter bootstrap with bower

I'm trying to install twitter bootstrap-sass with compass on windows. I'm installed any require things and now I have folder with this structure after running "compass create my-new-project -r bootstrap-sass --using bootstrap" command in cmd :

site
 |_ .sass-cache folder
 |_ javascripts 
 | |_ bootstrap folder 
 | |_ bootstrap.js 
 | |_ bootstrap-sprockets.js 
 |_ sass 
 | |_ bootstrap-variables.scss 
 | |_ styles.scss 
 |_ stylesheets 
 | |_ fonts 
 | |_ styles
 |_ config.rb

so how can I use twitter bootstrap now ?

NOTE: I think my sass files is not completely import to this folder (just two files !!!)

like image 729
Hamid Avatar asked Jun 30 '14 19:06

Hamid


1 Answers

To initialize a bower project after you've installed bower you can do

bower init

This will walk you through an interactive prompt to setup your bower.json file.

Once bower is setup, you can do:

bower install bootstrap-sass-official --save

This will download and install the sass version of Bootstrap to ./bower_components

Once that is complete, you can require bootstrap in styles.scss like so:

//= require ../bower_components/bootstrap-sass-official/assets/stylesheets/bootstrap.scss

However, because you're using compass, you might just want to use the bootstrap-sass gem by following the instructions here: https://github.com/twbs/bootstrap-sass#b-compass-without-rails

like image 79
BenjaminCorey Avatar answered Sep 19 '22 16:09

BenjaminCorey