Please see https://drupal.org/project/drushify. Moshe thought that module_builder might be a good home for this.

If you want it, I will create a patch to integrate drushify into module_builder, and delete the drushify project. If you don't want it, I will just keep drushify as it is.

Comments

joachim’s picture

Status: Needs review » Active

This sounds like it would totally fit into Module Builder. Should be fairly easy to fit it in now the generating system is all modular. The API and Test generators are good standalone subcomponents that you may want to refer to as examples.

greg.1.anderson’s picture

Great, I'll take a look. My existing generator is very simple -- I just have a few simple replacements that need to be done, so it shouldn't be too hard to integrate with your API. I'll post a patch when it's ready.

Chris Charlton’s picture

Issue summary: View changes

Still in the works?

joachim’s picture

I suspect it's fallen off greg.1.anderson's radar.

If you wanted to pick this up yourself, the principal steps involved in this are:

- create a new subclass of RootComponent for the drush command generator
- this should request a PHPFile subcomponent. IIRC at that point you can also request the functions you want (the drush hook and the command callback), and state they go in that file. The AdminSettingsForm component is probably a good example to look at.
- add a drush command that uses the new generator. There's a common helper function for drush commands that you can use.

joachim’s picture

Status: Active » Closed (outdated)

Module Builder is now just a UI. I've moved this issue to https://github.com/drupal-code-builder/drupal-code-builder/issues/158