For a while, I've been using a base webapp template that I've put together as the basis for most of my side projects. It started off as slight tweaks to HTML5 Boilerplate, then I changed to a customised version of a Yeoman template, then I ended up rewriting most of the Grunt file to match how I liked to start projects.

Yeoman, if you're not familiar with it, allows you to quickly scaffold out a project i.e. you run one command and it'll create folders, set up a Gruntfile and install dependencies for you so you can start developing without having to create or copy the same files and folder structure every time.

When I started projects, I kept cloning my base template - when you find yourself doing the same thing over and over again, that's a good sign that you can automate! For my app template, I decided to turn it into a Yeoman generator so I could start a project with all my preferred settings with one command.

There are a few good tutorials around on how to do this - basically it revolves around starting from Yeoman's generator-generator module then extending from there.

Once your code is written, you publish to NPM via npm publish, and your template can be used as the basis for a project with one command!

My generator can be found on NPM here and can be installed by running

npm install generator-wsmh-app