How can I add Bootstrap to my ember-cli app?

Hi! I am trying to add Twitter Bootstrap to my ember-cli app, and it appears to be much more complicated than I’ve expected.

Can someone give me a clear set of instructions on how should I do that?

You can use an addon I think there are few if you search em.

Or you can bower instal bootstrap and then in your brocfile app.import the bits you want directly from your local bower folder. IF you want to use less or sass you can also link to the css using import in your app.less / app.sass

I’m using only the affix javascript here is where I import it in my brocfile

  app.import(app.bowerDirectory + '/' + i);

Including css in my app.less

@import '../../bower_components/bootstrap/less/bootstrap.less';

see also

I’ve just dropped bootstrap’s JS in vendor/bootstrap and included them in brocfile:


I’m also using ember-cli-less to compile less files in app/styles/ into CSS. No need for dedicated bootstrap addon really.

1 Like

First add it to your build:

bower install --save-dev bootstrap

Then add it to your Brocfile.js


That should do it.

1 Like

In ember-cli minifyCSS is enabled so I think it is better to let Ember do the minify. See:

in newer versions of ember-cli, you have to put the app.imports in .ember-cli-build.js instead of Brocfile.js

1 Like

Thanks! The new link is:

1 Like

Thanks for this detail!

1 Like