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][] constructoroptions
- (required) configuration optionsargv
- (required) parsedprocess.argv
object from [minimist][] or whatever argv parser you prefer.
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
});
{%= apidocs("index.js") %}
The following constructor events are emitted:
Exposes runnerContext
as the only paramter.
Base.on('preInit', function(runnerContext) {
});
Exposes runnerContext
and app
(the application instance) as paramters.
Base.on('init', function(runnerContext, app) {
});
Exposes runnerContext
and app
(the application instance) as paramters.
Base.on('postInit', function(runnerContext, app) {
});
Exposes runnerContext
and app
(the application instance) as paramters.
Base.on('finished', function(runnerContext, app) {
});