Recommended way to include bootstrap library in Ember.JS ember-cli App

后端 未结 9 803
余生分开走
余生分开走 2020-11-28 21:18

I am trying to install properly Twitter Bootstrap in my current ember-cli project. I did install bootstrap with bower :

bower install --save bootstrap
         


        
9条回答
  •  渐次进展
    2020-11-28 21:34

    If you're using SASS (probably via ember-cli-sass), bower_components is automatically added to the lookup path. This means you can just use Bower and avoid the Brocfile/ember-cli-build file altogether.

    Install the official SASS version of Bootstrap with Bower

    bower install --save bootstrap-sass
    

    then import the lib in app.scss. The nice thing about this is you can customize the variables before importing bootstrap:

    $brand-primary: 'purple';
    
    @import 'bower_components/bootstrap-sass/assets/stylesheets/bootstrap';
    

提交回复
热议问题