Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
A simple task runner tool. Named after the best runner in the world, Usain Bolt.
JavaScript
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
build
lib
specs
.gitignore
.npmignore
LICENSE
README.md
index.js
package.json
usain

README.md

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
Something went wrong with that request. Please try again.