Drupal Code Generator
A command line code generator for Drupal.
Installation
# Download the latest stable release of the code generator.
wget https://github.com/Chi-teck/drupal-code-generator/releases/download/1.9.1/dcg.phar
# Make the file executable.
chmod +x dcg.phar
# Make the generator available to all users as a systemwide executable.
sudo mv dcg.phar /usr/local/bin/dcg
Upgrade
Simply repeat installation commands.
Usage
# Display main menu.
dcg
# Display Drupal 8 submenu.
dcg d8
# Call generator directly.
dcg d8:plugin:field-widget
Extending
Coping DCG core templates into $HOME/.dcg/Templates directory will automatically override them. All custom generators should be placed under $HOME/.dcg/Commands directory. The following command will help you to get started with creating own generators.
# Create custom DCG command.
dcg dcg-command -d$HOME/.dcg/Commands
License
GNU General Public License, version 2