Ember CLI バージョン 0.1.1 の時点で、これはプロジェクトで Bootstrap の less を使用するための推奨される方法です。
まず、ブートストラップをインストールします。
$ bower install --save-dev bootstrap
次に、少ないプリプロセッサをインストールします
$ npm install --save-dev ember-cli-less
次に、このフォルダー内の app.css を app.less に置き換えます。
/app/styles/
新しい app.less ファイル内で、これをファイルの先頭に追加します。
@import "../../bower_components/bootstrap/less/bootstrap.less";
Brocfile.js で、これを追加します。
app.import(app.bowerDirectory + '/bootstrap/dist/js/bootstrap.js');
Boostrap にバンドルされているグリフィコンも使用する場合は、これを Brocfile.js に追加します (ember-cli-build.js
最新の を使用している場合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'
});