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

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

    BASH:

    bower install --save bootstrap
    

    Brocfile.js:

    /* global require, module */
    
    ...
    
    
    app.import('bower_components/bootstrap/dist/css/bootstrap.css');
    app.import('bower_components/bootstrap/dist/css/bootstrap.css.map', {
        destDir: 'assets'
    });
    app.import('bower_components/bootstrap/dist/fonts/glyphicons-halflings-regular.eot', {
        destDir: 'fonts'
    });
    app.import('bower_components/bootstrap/dist/fonts/glyphicons-halflings-regular.ttf', {
        destDir: 'fonts'
    });
    app.import('bower_components/bootstrap/dist/fonts/glyphicons-halflings-regular.svg', {
        destDir: 'fonts'
    });
    app.import('bower_components/bootstrap/dist/fonts/glyphicons-halflings-regular.woff', {
        destDir: 'fonts'
    });
    app.import('bower_components/bootstrap/dist/fonts/glyphicons-halflings-regular.woff2', {
        destDir: 'fonts'
    });
    
    app.import('bower_components/bootstrap/dist/js/bootstrap.js');
    
    module.exports = app.toTree();
    

提交回复
热议问题