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

后端 未结 9 800
余生分开走
余生分开走 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:21

    $> bower install --save bootstrap
    

    Afterwards add following two lines to your ember-cli-builds.js (or Brocfile.js if you are using an older version of Ember.js):

    app.import(app.bowerDirectory + '/bootstrap/dist/js/bootstrap.js');
    app.import(app.bowerDirectory + '/bootstrap/dist/css/bootstrap.css');
    

    And voilà, ready to go!

    updated 08/18/2015: adapted to new scheme introduced in Ember.js 1.13

提交回复
热议问题