Here is my way to do this:
bower install bootstrap --save
npm install --save-dev grunt-contrib-less
- Rename
app/styles/app.css
toapp.less
- Add
@import "vendor/bootstrap/less/bootstrap.less";
to app.less - Add
<script src="/vendor/bootstrap/dist/js/bootstrap.min.js"></script>
toindex.html
Now to include fonts:
- Copy fonts from
vendor/bootstrap/dist/fonts
topublic/assets
- Add
@icon-font-path: "assets/fronts/"
; toapp.less
The other way is to setup fonts, is to add a new grunt-copy task, that copies the fonts automatically into public/assets
.
This is not necessary because they do not change often, but anyway:
Add this to tasks/options/copy.js
:
fonts: {
files: [{
expand: true,
cwd: 'vendor/bootstrap/dist/fonts',
src: ['*'],
dest: 'tmp/result/assets/fonts'
}]
},
Add this new taks to buildStyles
in Gruntfile.js
:
grunt.registerTask('buildStyles', filterAvailable([
'compass:compile',
'sass:compile',
'less:compile',
'stylus:compile',
'copy:cssToResult',
'copy:fonts' //<- HERE
]));