0.0.2 • Published 12 years ago

usain v0.0.2

Weekly downloads
12
License
-
Repository
github
Last release
12 years ago

Introduction

A simple task runner tool. Named after the best runner in the world, Usain Bolt.

Getting started

Using usain is super easy, just follow the steps below.

Install usain

npm install usain

Create your tasks module

This is where you define your tasks. This can live in ./build/tasks.js

var spawn = require('child_process').spawn;
var path = require('path');
var bolt = require("../lib/usain");

this.tests = function() {
	var jasmineScript = path.join("node_modules", "jasmine-node", "bin", "jasmine-node");
	var specsFolder = path.join("specs");
	return bolt.captureOutput("Tests", spawn("node", [jasmineScript, specsFolder]));
};
this.default = function() { // <== Executed when no arguments provided to runner
	return this.tests();
};

Create your runner

This is where you create your runner. This guy can live in ./usain

var bolt = require("./lib/usain");
bolt.tasks = require("./build/tasks"); // <== This is the module with your tasks

bolt.execute(process.argv);

Call on usain to run your tasks

Once configured, you can run usain.

node usain

Or you can specify the tasks you want to run.

node usain tests
0.0.2

12 years ago

0.0.1

12 years ago