Twitter bootstrap is a great piece of kit. Html5 boilerplate (h5bp) is also a great piece of kit. Those of you who have used h5bp know it also comes bundled (or not?) with a great ant build script. This build script automagically builds, minifies, compresses, concatenates, lints and hints the files you specify. A ton of crap, really.
You will have to read the documentation as it makes some assumptions in regards to your project scaffolding and what-have-you. Seriously, read the documentation. You don’t have to trust me when I say its worth it, but it is.
So now that I found this script, I want to use it on every project. Once everything is set-up it is just so easy to run. I have forced myself to use it on trivial tests and what not. My lab page is a total work-in-progress and made with Twitter bootstrap. I thought I would show you how I integrated h5bp ant-build-script with it.
A screen shot of my folder structure inside webstorm:
As you can see, I mimicked the file structure that h5bp recommends in the documentation (RTFM, right?)
I then modified the project. properties file to include the changes you see here:
Note: I’ve only included the actual changes to my file. The actual project.properties is a bit denser.
If you simply use build like I have, you will save a tremendous amount of time optimizing your pages for production. Once you see this in action… You will have a hard time turning back as well, I reckon.
Todo: Work out how to force the build script into nested directories for the manifest. Maybe even get a wild hair and attempt to write a pre build-build that analyzes the project structure.