WORK IN PROGRESS
Starter-theme and boilerplate for static site generation
This repository is build on top of build-boilerplate which in turn is a fork of static-site-boilerplate by Adam Beres-Deak, with some modifications:
- Sass instead of Less
- different Javascript workflow
- adapted Gruntfile.js file
When a boilerplate is further extended with, let’s say pre-processor modules (Sass), and the generation of gh-pages
, then it may still be usefull, but the scope will be more limiting. And it’s not a boilerplate anymore, but more an opinionated starter-theme; so that is what this is. When one likes parts of this thing, but other parts not so much, then maybe have build-boilerplate and this thing side by side, pick and choose, assemble your own starter-theme: make your own Bootstrap.
- Clone this repository
git clone https://github.com/atelierbram/flex-starter
- Install node dependencies
npm install
- Simply run
grunt build
to see that everything works - from the commandline run:
grunt gh-pages
to build the remote gh-pages branch
You can run grunt --dev
while developing. This starts a new web server on port 3000 (http://localhost:3000/).
After every change the affected files are regenerated.
grunt
- default task: build everything and then whatches for changes and regenerated the affected filesgrunt build
- builds everythinggrunt clean
- cleanupgrunt assemble
- generates html with Assemblegrunt sass
- generated css file(s) from Sass.scss filesgrunt concat
- concatenates JavaScript.js filesgrunt uglify
- minifies JavaScript.js filesgrunt cssmin
- minifies CSS.css filesgrunt hashres
- computes hash code for static resources (aka cachebusting)grunt connect
- starts web server and stops it automatically when all the other tasks finishedgrunt watch
- checks for file modifications and runs the appropriate tasksgrunt gh-pages
- to push to your gh-pages branch hosted on GitHub or any other branch anywhere else
All tasks accept a --dev
flag, which disables CPU intensive tasks like JS-optimization. This should only be used during development.
- Static site generation with Assemble
- Generating and minifying a single CSS file with Sass
- Concatanate and minify JavaScript
- Generating hash (cache buster) for JS and CSS files
- Automatic regeneration and Liverload during development
- grunt-gh-pages to push to your gh-pages branch hosted on GitHub or any other branch anywhere else
- static-site-boilerplate by Adam Beres-Deak
- grunt-assemble-boilerplate
- Effeckt.css
- article by Chis Coyier
Released under MIT Licence