I’ve tried several ways, and I’ve finally come up with this, for what it’s worth :
Install Bootstrap with Bower
Link to bootstrap.css from the css block of your index.html :
<!-- build:css(tmp/result) assets/app.min.css -->
<link rel="stylesheet" href="/assets/app.css">
<link rel="stylesheet" href="/vendor/bootstrap/dist/css/bootstrap.css">
<!-- endbuild -- >
Link to the js librairies in the js vendor block
<!-- @if dist=false -->
<script src="/vendor/handlebars/handlebars.js"></script>
<script src="/vendor/ember/ember.js"></script>
<script src="/vendor/bootstrap/dist/js/bootstrap.js"></script>
<!-- @endif --><!-- @if dist=true -->
<script src="/vendor/handlebars/handlebars.runtime.js"></script>
<script src="/vendor/ember/ember.prod.js"></script>
<script src="/vendor/bootstrap/dist/js/bootstrap.min.js"></script>
<!-- @endif -->
To use the Glyphicons, we need to copy the fonts :
// tasks/options/copy.js
javascriptToTmp: {
// snip
},
extrasToResult: {
expand: true,
cwd: 'vendor/bootstrap/dist',
src: 'fonts/*',
dest: 'tmp/result/'
},
// snip
Register it in Gruntfile.js
// Styles
grunt.registerTask('buildStyles', filterAvailable([
// snip
]));
// Extras
grunt.registerTask('buildExtras', [
'copy:extrasToResult'
]);
// snip
We can add other stuff here when needed.
Finally call the task, in the concurrent build process :
// Gruntfile.js
// Parallelize most of the build process
_.merge(config, {
concurrent: {
buildDist: [
"buildTemplates:dist",
"buildScripts",
"buildStyles",
"buildExtras",
"buildIndexHTML:dist"
],
buildDebug: [
"buildTemplates:debug",
"buildScripts",
"buildStyles",
"buildExtras",
"buildIndexHTML:debug"
]
}
});
Hope it helps.