usain

0.0.2 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i usain

Weekly Downloads

3

Version

0.0.2

License

none

Last publish

Collaborators

  • henrylawson