node package manager


Starting Blocks

Starting blocks is a project template that uses Yeoman scaffolding tools to help get up and running on a project quickly. It creates a lot of the project structure for you as well as giving a series of tools that can been called from the command line.

Getting Started

Install Yeoman

To install Yeoman, run this command on your terminal (you may be prompted to type your password):

sudo npm install -g yo

Install the template

To install the template, just install Starting Blocks using npm:

sudo npm install -g generator-sblocks

Create a new Project directory

Choose where you want the project to be created and create a directory:

mkdir ClientName-ProjectName
cd ClientName-ProjectName

Create a new Project

Run this command to create the new project:

yo sblocks

You will be prompted to answer some questions about the project which will form the basis of the projects README and implement some naming conventions. This command will also automatically install the grunt dependencies, so it may take a few seconds to finish.

The stack

  • CoffeeScript - A language that compiles to JavaScript
  • Stylus - A CSS preprocessor
  • Requirejs - A JavaScript file and module loader
  • Handlebars - A javascript library for building templates

Grunt tasks


The default task will compile and watch for changes on all CoffeeScript, Stylus and Handlebars files.

grunt build

This task will compile and uglify your CoffeeScript and Stylus files to single files, and will also copy all other assets to the release/ folder.

grunt bootstrap

This task will generate your bootstrap with all your CSS components.