# Clone the project.
git clone https://github.com/Chi-teck/drupal-code-generator
# Change working directory.
cd drupal-code-generator
# Install dependencies.
composer install
# Run generator.
bin/dcg
To make dcg available in any system location append this line to your .bashrc file:
alias dcg-dev=/path/to/to/drupal-code-generator/bin/dcg
Then after you have logged out and in the dcg development version will be accessible through dcg-dev command.
Install PHPUnit globally:
composer global require "phpunit/phpunit"
Make sure you have ~/.composer/vendor/bin in your PATH:
export PATH=~/.composer/vendor/bin:$PATH
The following alias may help you run tests and check code style from any location:
alias dcg-test="(cd /path/to/drupal-code-generator && phpunit && phpcs -p --standard=./phpcs.xml)"
/path/to/drupal-code-generator/scripts/run-sut-tests.php
- Install Box 2.
- Navigate to the directory where Drupal Code Generator was installed.
- Run the following command:
box build
(use-v
option if you need verbose output). - Test the generated archive:
php dcg.phar --version
.