File structure
- source - source files, including jade templates and css, image and javascript assets
- deploy - files to be put on the web server, compressed and minified
To build the source files, you must have Node.js installed. Then install the required modules:
npm install -d
Grunt is used as the build tool. This will compile the jade templates in source into deploy, as well as concatenate the css into a single file and minify, and concatenate and minify the javascript (currently only bootstrap.js). To build the project:
./node_modules/grunt/bin/grunt all
The root path for the size is set in the source/includes/variables.jade
in the variable rootUrl
. To set this to the root of the server (i.e. the URL is /), set this to the empty string. To set the root of the web site to something else, set to the path without the trailing slash.
Note that grunt-contrib 0.0.3 and below has an issue with the jade task that will prevent it from working. This is fixed in head and should be in npm soon. To manually fix, change the following line from:
var opts = _.extend(options, {filename: filename}),
to:
var opts = _.extend({filename: filename}, options),
John Goodall, twitter @johnrgoodall
The basic framework is provided by bootstrap. Only a subset of the javascript is being used, from a custom build by boots, built by running: boots --js bootstrap-collapse.js,bootstrap-tooltip.js -o custom
. The css files are used as is (built from the less files by make bootstrap
in the bootstrap project).
Web pages are written in jade, which compiles into HTML. Javascript are minified using uglify-js, and CSS is minified using clean-css.
Previously, CSS was compiled and minified using recess.