tooljs
Composable Tooling for JavaScript.
API
.exec(fn)
Execute a tool instance manually, which recursively executes any sub-tools.
var tool = ; var Example = ;var example = ;example;
Tool.option
Create options for your tool.
var tool = ; var Example = ; var example = a: 'hello' b: 'world' ;example;
Examples
Composing tools
How you might build a generator:
var template = ;var tool = ;var source = __dirname + '/templates'; var Generator = // still figuring out the API for this type of thing, setting defaults on nestd tools. ;
Making tools into modules
This way you can easily compose them. To do this, it seems this type of pattern should work:
var template = ;var tool = ;var source = __dirname + '/templates'; var Generator = // still figuring out the API for this type of thing, setting defaults on nestd tools. ; module{ return Generator;};