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

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

    This is how I package vendor CSS files with Broccoli (which underpins Ember-cli).

     var vendorCss = concat('vendor', {
       inputFiles: [
         'pikaday/css/pikaday.css'
       , 'nvd3/nv.d3.css'
       , 'semantic-ui/build/packaged/css/semantic.css'
       ]
      , outputFile: '/assets/css/vendor.css'
      });
    

    Where the vendor folder is where my Bower packages live. And assets is where I'm expecting my CSS to live. I'm assuming you've installed Bootstrap using Bower, which is the Ember-cli way.

    Then in my index.html, I'm simply referencing that vendor.css file:

      
    

    Cheers.

提交回复
热议问题