Package Exports
- base-runner
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (base-runner) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
base-runner

Orchestrate multiple instances of base-methods at once.
Install
Install with npm:
$ npm i base-runner --saveUsage
var runner = require('base-runner');
var Base = require('base');
var base = new Base();Register the plugin
base.use(runner());With the plugin registered, you can now call the .runner method with the name of the "configfile" to search for (e.g. verbfile.js, generator.js, assemblefile.js, etc):
base.runner('configfile.js', function(err, argv, app) {
// `err`: error object
// `argv`: command line arguments, parsed by minimist and pre-processed
// `app`: instance of `base` with configfile.js invoked
});Example usage
base.runner('generator.js', function(err, argv, app) {
if (err) throw err;
app.cli.process(argv, function(err) {
if (err) throw err;
});
});API
Params
configfile{String}: The name of the configfile to initialize with. For example,generator.js,assemblefile.js,verbfile.jsetc.callback{Function}: Callback that exposeserr,argvandappas arguments.argvis pre-processed by minimist then processed by [expand-args][]. The originalargvarray is exposed onargv.orig, and the object returned by minimist is exposed onargv.minimist.appis the resolved application instance to be used.returns{undefined}
Example
base.runner('verbfile.js', function(err, argv, app) {
// handle err
// do stuff with argv and app
app.cli.process(argv, function(err) {
// handle err
});
});Related projects
- base: base is the foundation for creating modular, unit testable and highly pluggable node.js applications, starting… more | homepage
- base-generators: Adds project-generator support to your
baseapplication. | homepage - base-options: Adds a few options methods to base-methods, like
option,enableanddisable. See the readme… more | homepage - base-plugins: Upgrade's plugin support in base-methods to allow plugins to be called any time after init. | homepage
- base-store: Plugin for getting and persisting config values with your base-methods application. Adds a 'store' object… more | homepage
- base-tasks: base-methods plugin that provides a very thin wrapper around https://github.com/jonschlinkert/composer for adding task methods to… more | homepage
Running tests
Install dev dependencies:
$ npm i -d && npm testContributing
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
Author
Jon Schlinkert
License
Copyright © 2016 Jon Schlinkert Released under the MIT license.
This file was generated by verb, v0.9.0, on February 09, 2016.