Xcraft-Inc / shellcraft.js

Simple CLI and shell for Node.js based on commander and inquirer.
MIT License
6 stars 1 forks source link

Improve the register API #7

Closed Skywalker13 closed 9 years ago

Skywalker13 commented 9 years ago

The current API fir the register function (extensions) is a bit low level; it should be improved.

For example, something like:

exports.register = function (shellext, callback) {
  shellext
    .command ('blabla', {}, function () {})
    .command ('blabla', {}, function () {})
    .option ('blabla', {}, function () {});

  callback (null, shellext);
};
Skywalker13 commented 9 years ago

Fixed by c957607bd9b1ac641adcaab79ef8be95df6b8df4