As of Ember CLI version 0.1.1, this is the recommended way to use Bootstrap's less in your project.
First, install bootstrap:
$ bower install --save-dev bootstrap
Then install the less preprocessor
$ npm install --save-dev ember-cli-less
Then replace app.css with app.less in this folder:
/app/styles/
Inside your new app.less file, add this to the top of the file:
@import "../../bower_components/bootstrap/less/bootstrap.less";
In your Brocfile.js, add this:
app.import(app.bowerDirectory + '/bootstrap/dist/js/bootstrap.js');
If you also want to use glyphicons that are bundled with boostrap, add this to Brocfile.js (ember-cli-build.js
if you're using the latest ember-cli
):
app.import(app.bowerDirectory + '/bootstrap/fonts/glyphicons-halflings-regular.eot', {
destDir: 'fonts'
});
app.import(app.bowerDirectory + '/bootstrap/fonts/glyphicons-halflings-regular.svg', {
destDir: 'fonts'
});
app.import(app.bowerDirectory + '/bootstrap/fonts/glyphicons-halflings-regular.ttf', {
destDir: 'fonts'
});
app.import(app.bowerDirectory + '/bootstrap/fonts/glyphicons-halflings-regular.woff', {
destDir: 'fonts'
});