code: function release(type) {
  
  	// 'npm version' needs a clean repository to run
  	if (!isDirectoryClean()) {
  		echo('RELEASE ERROR: Working directory must be clean to push release!');
  		exit(1);
  	}
  
  	echo('Running tests');
  	target.test();
  
  	// Step 1: Create the new version
  	echo('Creating new version');
  	var newVersion = exec('npm version ' + type).output.trim();
  
  	// Step 2: Generate files
  	echo('Generating dist files');
  	dist();
  
  	echo('Generating changelog');
  	target.changelog();
  
  	echo('Updating README');
  	updateReadme(newVersion);
  
  	// Step 3: Validate CommonJS wrapping
  	echo('Validating module loading');
  	validateModuleLoading();
  
  	// Step 4: Add files to current commit
  	execOrExit('git add -A');
  	execOrExit('git commit --amend --no-edit');
  
  	// Step 5: reset the git tag to the latest commit
  	execOrExit('git tag -f ' + newVersion);
  
  	// Step 6: publish to git
  	echo('Pushing to github');
  	execOrExit('git push origin master --tags');
  
  	// Step 7: publish to npm
  	echo('Publishing to NPM');
  	execOrExit('npm publish');
  
  	// Step 8: Update version number in docs site
  	echo('Updating documentation site');
  	execOrExit('git checkout gh-pages');
  	('version: ' + newVersion).to('_data/t3.yml');
  	execOrExit('git commit -am "Update version number to ' + newVersion + '"');
  	execOrExit('git fetch origin && git rebase origin/gh-pages && git push origin gh-pages');
  
  	// Step 9: Switch back to master
  	execOrExit('git checkout master');
  
  	// Step 10: Party time
  }
docs: Creates a release version tag and pushes to origin.
  @param {string} type The type of release to do (patch, minor, major)
  @returns {void}