A starter kit for your web project based on Bootstrap 4, with grunt and bower
- Bootstrap 4 (alpha version, see documentation)
- SASS
- Font Awesome
- Respond.JS
- html5shiv
- Grunt
- Bower
Starterkit-BT4 is released under the MIT License.
This project requires Grunt and Bower.
From the project's directory execute :
$ npm -g install grunt-cli bower
$ npm install
$ bower install
Run project with Grunt.
$ grunt
If you are having difficulty installing BT4 with bower, since it is still an alpha version, use :
$ bower install bootstrap#v4.0.0-alpha
To have statistics on the project, run the following command :
$ grunt stats
CSS-count gives you data on the code (IE9 is limited to 4095 selectors) and PageSpeed offers data on the project performance according to Google PageSpeed Insights.
Starterkit-BT4 (SBT4 in short) uses the grunt contrib for criticalcss. When you launch grunt, it generates critical css files in css/critical/.. that you can copy, paste and inline in the head of your html.
If you used to use LESS, you might be interested in these readings :
- the SASS website : http://sass-lang.com/
- some SASS resources : http://thesassway.com/
- how to override the Bootstrap variables (the variables are interpreted differently) : RailsApps/rails-bootstrap#12
- using REM instead of px is very awesome for a lot of reasons I won't enumerate here. To facilitate the switch to REM unit, you can use the calc-rem() function defined in the scss/custom-variables.scss file, unless you ask grunt to manage it for you.