The generator module is just easy drupal module for developers, not for production website.

With this module you can quickly create a module or a theme from drush.
Example :

$ drush generate-module

Sandbox url: https://drupal.org/sandbox/pokap/2147227

Git url:

Comments

pokap’s picture

Title: [D7] Generator module/theme » [D7][D8] Generator module/theme
Status: Needs work » Needs review
PA robot’s picture

Status: Needs review » Needs work

There are some errors reported by automated review tools, did you already check them? See http://pareview.sh/pareview/httpgitdrupalorgsandboxpokap2147227git

We are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and put yourself on the high priority list, then we will take a look at your project right away :-)

Also, you should get your friends, colleagues or other community members involved to review this application. Let them go through the review checklist and post a comment that sets this issue to "needs work" (they found some problems with the project) or "reviewed & tested by the community" (they found no major flaws).

I'm a robot and this is an automated message from Project Applications Scraper.

pokap’s picture

Hello,

This is my first drupal module for community.
I applied several recommandation of pareview.sh, but not all, like README.txt because I create the README.md for github, and I won't create 2 README or just rename the existing file.
There are many false problem identified because of my unit tests use PHPUnit and I mock drush functions.

Finally, I have a question for contributors releases.
I tried to update packagist with releases but the syntax 7.x-1.0 is not excepted. Do you have another way to have a compatible module with packgist and drupal.org ?

Thanks all.

pokap’s picture

Status: Needs work » Needs review
pokap’s picture

Title: [D7][D8] Generator module/theme » [D7] Generator module
miroslavbanov’s picture

Status: Needs review » Needs work

Thanks for contributing this project. It worked for me with PHP 5.3.8 and drush 5.8. I had a strange issue with the commands until I ran drush cache-clear drush, and then they worked.

I found several issues though:

  1. Use http git url for drupal repo (http://git.drupal.org/sandbox/pokap/2147227.git). Other people don't have access to clone the non-http url.
  2. I see that the github repo is one version ahead the drupal one. Make sure that you have the latest version in the drupal repo, if you want that version to be reviewed.
  3. This project only has drush commands. I don't see why it needs to be a drupal module and not a drush module instead. See https://drupal.org/project/registry_rebuild for example of a drush module.
  4. Most drush commands take parameters passed to the command directly. I don't see why these commands need to work with prompt.
  5. You use "version = VERSION" in module info and theme info files. This line ties the module/theme version with the drupal core version, which shouldn't be done for non-core modules and themes.
  6. You implement hook_theme and add drush inc file. These should not be considered common, and I don't see why they should be added to the module automatically.
  7. The generated theme has missing line breaks in the info file: name = mythemedescription = My themepackage = mythemeversion = VERSION
jeroent’s picture

This module is a great idea, but is there a difference between this module and module builder ?

pokap’s picture

Hello MiroslavBanov, thanks for you comment.

I was answer you each question.

  1. Use http git url for drupal repo (http://git.drupal.org/sandbox/pokap/2147227.git). Other people don't have access to clone the non-http url.
    > I didn't understand your notice.
  2. I see that the github repo is one version ahead the drupal one. Make sure that you have the latest version in the drupal repo, if you want that version to be reviewed.
    > Thanks for it, I removed. I tkink is too dangerous to keep 2 repo, now I develop only on drupal git.
  3. This project only has drush commands. I don't see why it needs to be a drupal module and not a drush module instead. See https://drupal.org/project/registry_rebuild for example of a drush module.
    > It's a good remark, it needs to be a drupal module because is use the theme API for generate file, with it you can override the behavior with preprocess for example.
  4. Most drush commands take parameters passed to the command directly. I don't see why these commands need to work with prompt.
    > Thank for this remark, I add options for creating.
  5. You use "version = VERSION" in module info and theme info files. This line ties the module/theme version with the drupal core version, which shouldn't be done for non-core modules and themes.
    > Thanks for it, I removed.
  6. You implement hook_theme and add drush inc file. These should not be considered common, and I don't see why they should be added to the module automatically.
    > See 3rd response.
  7. The generated theme has missing line breaks in the info file: name = mythemedescription = My themepackage = mythemeversion = VERSION
    > I don't see this, I work in linux environment. Do you work on windows environment ?

Hello JeroenT, thanks for you comment too.

This module is a great idea, but is there a difference between this module and module builder ?
> Good question, is right that this module is not very difference with module-builder, but I improve this module for adding OOP and API.
This module is more a sandbox for your project development. You can create your sandbox Drupal with this module, and if you want adding file or hook in your module generate, you use generator module API.

miroslavbanov’s picture

The generated theme has missing line breaks in the info file: name = mythemedescription = My themepackage = mythemeversion = VERSION
> I don't see this, I work in linux environment. Do you work on windows environment ?
>> Yes. I did test it on a windows machine.

klausi’s picture

Status: Needs work » Postponed (maintainer needs more info)

https://drupal.org/project/module_builder

This sounds like a feature that should live in the existing module_builder project. Module duplication and fragmentation is a huge problem on drupal.org and we prefer collaboration over competition. Please open an issue in the module_builder issue queue to discuss what you need. You should also get in contact with the maintainer(s) to offer your help to move the project forward. If you cannot reach the maintainer(s) please follow the abandoned project process.

If that fails for whatever reason please get back to us and set this back to "needs review".

PA robot’s picture

Status: Postponed (maintainer needs more info) » Closed (won't fix)

Closing due to lack of activity. Feel free to reopen if you are still working on this application (see also the project application workflow).

I'm a robot and this is an automated message from Project Applications Scraper.