Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugins #62

Open
seaneagan opened this issue Jun 3, 2014 · 0 comments
Open

Plugins #62

seaneagan opened this issue Jun 3, 2014 · 0 comments

Comments

@seaneagan
Copy link
Owner

Consider a similar approach to: https://github.com/chriso/cli#plugins

Existing issues for plugin-like functionality:

Help could be implemented internally as a plugin which is always included.

@Command(plugins: const [const Version(), const Completion(), const Logging()]
class MyCommand {
  static logger
}

The plugin API could initially be private, and there could just be hardcoded checks for known plugins. Presumably exposing the plugin API would be dependent on exposing the currently private Usage and CommandInvocation APIs, which is #19. Something like:

class Plugin {
  void updateUsage(Usage usage);
  bool onParse(CommandInvocation commandInvocation);
  bool onValidate(CommandInvocation commandInvocation);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant