tax

simple node.js build tool

npm install tax
1 downloads in the last week
1 downloads in the last month

tax

simple node.js build tool. tax does tasks

example

// task definition

//
// a global function that calls to runner.createTask(name, description)
// every callback's this.args is a reference to an arguments object
//
task('build_less', 'compile less into ./static/less')
  .mkdir('-p ./build/less')
  .rm('./build/less/*')
  .lessc('./less/index.less > ./build/css/index.css')
  .watch('./less/*', './build/css/index.css');

installation

npm install -g tax

usage

You must first create a tax.js file like and define all of your tasks there. Then you can run your tasks:

$ tax build_less -foo bar

or list them

$ tax -l

config

you can set the global config.jshint to configure jshint (check this out).

api

.mkdir('./css')

the string must be a string valid for mkdir(1). we're just wrapping a child process here.

.mkdir(cb)

cb is a synchronous or asynch function.
cb gets one argument (done) which must be called when done: done(err=null, string).
if cb is synchronous, then it must return a string or an array of strings (which will be contatenated together).

the rest of the api follows the same pattern

.cp()

.mv()

.rm()

.lessc()

.hint()

.test()

and of course

.async()

.sync()

.exec()

.watch()

npm loves you