Skip to content

atelierbram/build-boilerplate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Boilerplate

This repository is build on top of a fork of static-site-boilerplate by Adam Beres-Deak, with some modifications:

  • Sass instead of Less
  • different Javascript workflow
  • adapted Gruntfile.js file

How to use this?

  1. Clone this repository git clone https://github.com/atelierbram/build-boilerplate
  2. Install node dependencies npm install
  3. Simply run grunt build to see that everything works

How to work with this?

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.

Available Grunt tasks

  1. grunt - default task: build everything and then whatches for changes and regenerated the affected files
  2. grunt build - builds everything
  3. grunt clean - cleanup
  4. grunt assemble - generates html with Assemble
  5. grunt sass - generated css file(s) from Sass.scss files
  6. grunt concat - concatenates JavaScript.js files
  7. grunt uglify - minifies JavaScript.js files
  8. grunt cssmin - minifies CSS.css files
  9. grunt hashres - computes hash code for static resources (aka cachebusting)
  10. grunt connect - starts web server and stops it automatically when all the other tasks finished
  11. grunt watch - checks for file modifications and runs the appropriate tasks

All tasks accept a --dev flag, which disables CPU intensive tasks like JS-optimization. This should only be used during development.

What is included?

  1. Static site generation with Assemble
  2. Generating and minifying a single CSS file with Sass
  3. Concatanate and minify JavaScript
  4. Generating hash (cache buster) for JS and CSS files
  5. Automatic regeneration and Liverload during development

Resources

Extension

For a more opinionated starter-theme and boilerplate for static site generation, one could consider Flex Starter - which uses, among other things grunt-gh-pages, to push to your gh-pages branch hosted on GitHub or any other branch anywhere else. Even better, when one likes parts of this thing, but other parts not so much, then maybe have flex-starter and this thing side by side, pick and choose, assemble your own starter-theme: make your own Bootstrap.

License

Released under MIT Licence

About

Boilerplate code for static site generation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published