crcn / capirona

Javascript Build System

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Javascript Tasks

Example task:

var capirona = require("capirona");

capirona.make({
	"def hello/:name": {
		"run": function(target, next) {
			console.log("hello %s!", target.data.name);
			next();	
		}
	}
}).run("hello/craig", function() {
	console.log("done");
});

API

.make(task)

creates a new runnable script

.run(command, target, callback)

runs the given task. The target can be any value. For example:

capirona.make({
        "def log": {
                "run": function(target, next) {
                        console.log(target.value || target.data.text);
                        next();
                }
        }
}).
run("log", "hello world!").
run("log", {
	text: "hello world!"
});

About

Javascript Build System


Languages

Language:JavaScript 99.6%Language:Perl 0.3%Language:Shell 0.1%