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

[console] Implement and document mechanism to allow contrib commands #458

Closed
fluxsauce opened this issue Feb 26, 2015 · 7 comments
Closed

Comments

@fluxsauce
Copy link
Contributor

I'd like to add https://github.com/fluxsauce/site_audit/tree/8.x-2.x integration.

@jmolivas
Copy link
Member

👍

@fluxsauce
Copy link
Contributor Author

To clarify the scope; allow contrib commands to be added that aren't part of a Drupal installation.

@Jaesin
Copy link
Contributor

Jaesin commented Jun 1, 2015

So you are saying console should search in ~/.drupal_console/modules-enabled (Or something like that) for drupal modules with console commands.

@fluxsauce
Copy link
Contributor Author

@Jaesin I was thinking something similar to Drush commands, which can be installed in places like ~/.drush/commands.

Ideas:

  • ~/.drupal_console/contrib
  • ~/.drupal_console/commands
  • ~/.drupal_console/vendor

Thoughts?

@jmolivas
Copy link
Member

jmolivas commented Jun 2, 2015

The command discovery mechanism search for command classes at DrupalConsole + DrupalCore + Custom/Contrib modules.

We can update the code to search for commands classes ouside of a custom/contrib module at a common place like you mentioned, I was thinking to use ~/.console/src/Command/.

@jmolivas
Copy link
Member

jmolivas commented Jun 2, 2015

For commands inside a contrib module command classes must be created at MODULE_NAME/src/Command if the command is a generator then the generator class must be created at MODULE_NAME/src/Generator

As the webprofiler module:
https://github.com/lussoluca/webprofiler/tree/8.x-1.x/src/Command

@jmolivas
Copy link
Member

@Jaesin & @fluxsauce I will close and add a new issue on the documentation project repository.

Related issue:
hechoendrupal/drupal-console-book#57

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

3 participants