## Usage ```js var runner = require('{%= name %}'); var Base = require('base'); runner(Base, options, argv, function(err, app, runnerContext) { // `err`: error object, if an error occurred // `app`: instance of `base` // `runnerContext`: object with `argv`, `env` and `options` properties }); ``` **Params** - `Base` - (required) [base][] constructor - `options` - (required) configuration options - `argv` - (required) parsed `process.argv` object from [minimist][] or whatever argv parser you prefer. ### Example ```js var runner = require('{%= name %}'); var Base = require('base'); var config = { name: 'awesome', cwd: process.cwd(), runner: require('./package.json'), processTitle: 'awesome', moduleName: 'awesome', extensions: { '.js': null } }; runner(Base, options, argv, function(err, app, runnerContext) { // `err`: error object, if an error occurred // `app`: instance of `base` // `runnerContext`: object with `argv`, `env` and `options` properties }); ``` ## API {%= apidocs("index.js") %} ## Events The following constructor events are emitted: - [preInit](#preInit) - [init](#init) - [postInit](#postInit) ### preInit Exposes `runnerContext` as the only paramter. ```js Base.on('preInit', function(runnerContext) { }); ``` ### init Exposes `runnerContext` and `app` (the application instance) as paramters. ```js Base.on('init', function(runnerContext, app) { }); ``` ### postInit Exposes `runnerContext` and `app` (the application instance) as paramters. ```js Base.on('postInit', function(runnerContext, app) { }); ``` ### finished Exposes `runnerContext` and `app` (the application instance) as paramters. ```js Base.on('finished', function(runnerContext, app) { }); ```