Skip to content

Commit

Permalink
Export invoke as single module
Browse files Browse the repository at this point in the history
  • Loading branch information
passy committed Apr 17, 2013
1 parent 4f43dfa commit 0486c2c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions lib/actions/invoke.js
Original file line number Diff line number Diff line change
@@ -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)
Expand All @@ -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 || [];
Expand Down
2 changes: 1 addition & 1 deletion lib/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0486c2c

Please sign in to comment.