I have worked on Ember apps before, but never with the Ember App Kit, and in fact this world of gruntfiles and bower dependencies and stuff is pretty new to me. I've created a fresh, just-unpacked ember app kit project at this repo, and been attempting to just get the styling you see in app/templates/application.hbs to work.
I thought this thread on the Ember Discourse would be super helpful, but I must be missing something fundamental because I tried for a few hours this morning to follow all that advice, and I haven't gotten it working.
A summary of the progress I made that seemed (to me) to be on the right path:
npm install --save-dev grunt-contrib-less
based on the info here.bower install --save bootstrap
grunt dist
the bootstrap stuff is not in dist/assets/whatevercode.min.cssThis really shouldn't be that challenging, except I am missing some basic knowledge I think. This isn't an edge case certainly, I just want vanilla bootstrap in my vanilla EAK. :)
Here is my way to do this:
bower install bootstrap --save
npm install --save-dev grunt-contrib-less
app/styles/app.css
to app.less
@import "vendor/bootstrap/less/bootstrap.less";
to app.less<script src="/vendor/bootstrap/dist/js/bootstrap.min.js"></script>
to index.html
Now to include fonts:
vendor/bootstrap/dist/fonts
to public/assets
@icon-font-path: "assets/fronts/"
; to app.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
]));