Git Product home page Git Product logo

static-site-boilerplate's Introduction

static-site-boilerplate

Some boilerplate code for static site generation

How to use this?

  1. Clone this repository git clone https://github.com/bdadam/static-site-boilerplate
  2. Install node dependencies npm install
  3. Install bower dependencies bower install
  4. 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 less - generated css file(s) from less files
  6. grunt uncss - removes unnecessary css rules
  7. grunt requirejs - generates JavaScript files with RequireJS (or Almond)
  8. grunt hashres - computes hash code for static resources (aka cachebusting)
  9. grunt connect - starts web server and stops it automatically when all the other tasks finished
  10. 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 Less
  3. Generating and minifying a single JavaScript file with RequireJS
  4. Removing unnecessary CSS rules with uncss
  5. Generating hash (cache buster) for JS and CSS files
  6. Automatic regeneration and Liverload during development

Who is using this boilerplate?

static-site-boilerplate's People

Contributors

bdadam avatar

Watchers

James Cloos avatar Prabhjot Singh Lamba avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.