diff --git a/lib/actions/invoke.js b/lib/actions/invoke.js index cb70def6..852b8716 100644 --- a/lib/actions/invoke.js +++ b/lib/actions/invoke.js @@ -1,7 +1,5 @@ var path = require('path'); -var invoke = module.exports; - // Receives a `namespace`, and an Hash of `options` to invoke a given // generator. The usual list of arguments can be set with `options.args` // (ex. nopt's argv.remain array) @@ -13,7 +11,7 @@ var invoke = module.exports; // `Environment#create` for the list of possible values. // // Returns the generator instance. -invoke.invoke = function invoke(namespace, options, cb) { +module.exports = function invoke(namespace, options, cb) { cb = cb || function () {}; options = options || {}; options.args = options.args || []; diff --git a/lib/base.js b/lib/base.js index 61b4afd3..950477a2 100644 --- a/lib/base.js +++ b/lib/base.js @@ -86,10 +86,10 @@ _.extend(Base.prototype, require('./actions/actions')); _.extend(Base.prototype, require('./actions/fetch')); _.extend(Base.prototype, require('./actions/file')); _.extend(Base.prototype, require('./actions/install')); -_.extend(Base.prototype, require('./actions/invoke')); _.extend(Base.prototype, require('./actions/string')); _.extend(Base.prototype, require('./actions/wiring')); Base.prototype.prompt = require('./actions/prompt'); +Base.prototype.invoke = require('./actions/invoke'); // Adds an option to the set of generator expected options, only used to // generate generator usage. By default, generators get all the cli option