0.7.0
This is a simple boilerplate I cooked up for static site projects. It's nothing too fancy, but it uses Grunt and Assemble.
Assemble is a great tool to build static sites. You could compare it to Jekyll, but it serves a slightly different purpose. Think "non-blog static site". Assemble will crunch your templates and content into HTML and grunt and its bevy of plug-ins will do the rest.
Grunt will:
- process your SASS, autoprefix and minify your CSS
- lint, concatenate, and minify your JavaScript
- minify your HTML
- create a local server for you to develop
- Live reload!
You'll need Node, Node-Sass, the Grunt-cli, and the Live Reload browser extension.
After cloning, use your terminal to navigate to the directory, give it an old npm install
and you'll be off to the races.
Some commands:
grunt
will compile your site into the "./dist" directorygrunt serve
will throw a server up at http://localhost:8000 and watch for changesgrunt html
will package up your site templates and minifygrunt clean
will delete all of the HTML files in "./dist"grunt style
will convert your SASS, autoprefix, and minify your CSSgrunt js
will lint, concatenate, and uglify your JS.
Make sure to update the info in the package.json
file with your site's name, your name, etc.
Grunt's really flexible, so feel free to change whatever you'd like. This boilerplate reflects my way of working, and by no means is it gospel.