Runtime plugins for command line interfaces
Collection of plugins for command line interfaces defined using the mkcli tool.
npm i mkcli-runtime --save
For the command line interface install mkdoc globally (npm i -g mkdoc
).
load(def[, opts])
Load a program definition into a new program assigning the definition properties to the program.
Properties are passed by reference so if you modify the definition the program is also modified.
Returns a new program.
def
Object the program definition.opts
Object program options.
run(src, argv[, runtime], cb)
Load a program definition into a new program assigning the definition properties to the program.
Properties are passed by reference so if you modify the definition the program is also modified.
The callback function signature is function(err, req)
where req
is a
request object that contains state information for program execution.
Plugins may decorate the request object with pertinent information that
does not affect the target
object that receives the parsed arguments.
Returns a new program.
src
Object the source program or definition.argv
Array the program arguments.runtime
Object runtime configuration.cb
Function callback function.
MIT
Created by mkdoc on August 3, 2016