Simple boilerplate for quickly setting up a static site.
By default there are included:
- Normalize.css, a modern alternative to CSS resets,
- Bourbon, a simple and lightweight mixin library for Sass,
- Neat, a lightweight and semantic grid framework for Sass and Bourbon,
- Gulp, task runner with several awesome plugins,
- jQuery, javascript library,
- svg4everybody.js, script allowing to use external SVG sprites in browser that do not support this feature.
- Make sure you have
git
,nodejs
,npm
andbower
installed, - Clone the repo (
git clone https://github.com/klapec/bourbonify.git
) andcd
into it, - Run
npm install
, - Run
gulp build
, - Run
gulp
.
There are few gulp tasks present in the gulpfile.
gulp build
– downloads dependencies (Normalize.css, Bourbon and Neat) using Bower, moves them toassets/src/stylesheets/vendors/
and renames Normalize so that it can be imported by Sass,gulp
(default task) – builds all the assets (stylesheets, scripts, images and SVGs) and begins to watch all the files for changes. It will automatically re-run compilation of changed asset and reload the browser,gulp styles
– handles stylesheets compilation. Uses sass (ruby-sass) to compile Sass into CSS, autoprefixes all the needed vendor prefixes in your CSS files, minifies them and outputs the compiledmain.min.css
toassets/dist/stylesheets/
,gulp scripts
– handles JavaScript scripts. It first uses jshint to lint your scripts and check if there are any errors in them, it then concatenates all your scripts into a single file (decreasing HTTP request for performance reasons) and minifies it usinguglify
,gulp vendorScripts
– does pretty much the same as the task above. It handles vendor scripts (fromassets/src/scripts/vendors/
) but it doesn't run them through linting – we are assuming that those 3rd party scripts were written properly,gulp images
– optimizes your images. Uses imagemin to shrink them in size while not losing too much of quality,gulp svg
– does pretty much the same except for your SVG files. The difference is that it automatically compiles them into a singlesprite.svg
file (again, performance reasons). Each of your SVG files can be accessed then in your website easily by an ID of their original name, prefixed byicon-
. Read more about this technique on CSS-Tricks.
├── assets
│ ├── dist
│ └── src
│ │ ├── images
│ │ ├── scripts
│ │ │ ├── main.js
│ │ │ └── vendors
│ │ │ │ └── svg4everybody.js
│ │ ├── stylesheets
│ │ │ ├── base
│ │ │ ├── components
│ │ │ ├── main.scss
│ │ │ ├── pages
│ │ │ ├── partials
│ │ │ ├── themes
│ │ │ ├── utils
│ │ │ └── vendors
│ │ └── svg
├── LICENSE
├── README.md
├── bower.json
├── favicon-192x192.png
├── favicon.ico
├── gulpfile.js
├── index.html
└── package.json