Chi-teck / drupalrc

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Drupal RC

Useful Bash functions for Drupal development.

Installation

# Local installation.
url=https://raw.githubusercontent.com/Chi-teck/drupalrc/master &&
wget -O $HOME/.drupalrc $url/drupalrc &&
echo source $HOME/.drupalrc >> $HOME/.bashrc &&
wget -O $HOME/.drupal.complete.sh $url/drupal.complete.sh &&
echo source $HOME/.drupal.complete.sh >> $HOME/.bash_completion
# System-wide installation (run as super user).
url=https://raw.githubusercontent.com/Chi-teck/drupalrc/master &&
wget -O /etc/drupalrc $url/drupalrc &&
echo source /etc/drupalrc >> /etc/bash.bashrc &&
wget -O /etc/bash_completion.d/drupal.complete.sh $url/drupal.complete.sh

Log out and log in again for the changes to take effect.

Functions

droot

Print absolute path to Drupal root directory.

dcd

Quick navigation between Drupal directories.

dcd views # core/modules/views
dcd files # sites/default/files
dcd contrib # modules/contrib
dcd themes # themes
dcd # Drupal root directory

dl

Downloads Drupal projects using Composer.

dl admin_toolbar token feeds

dle

Downloads and enables Drupal modules.

dcr

Rebuilds Drupal caches using drush cr.

dconf

Opens specified configuration file in default editor.

dconf # settings.php
dconf settings.local.php # settings.local.php
dconf services.yml # services.yml

dbin

Executes scripts from vendor/bin directory.

dbin phpcbf --help

dcomposer

Launcher for Composer.

dcomposer show

dcg

Launcher for Drupal Code Generator.

drush

Launcher for Drush.

drupalcs

Checks the code against Drupal coding standards using PHP code sniffer.

drupalcs modules/custom/foo

dunit

Launcher for PHPUnit.

dunit tests/src/Functional/SomeTest.php

dready

Prepares sites/default directory for new installation process.

License

GNU General Public License, version 2.

About


Languages

Language:Shell 100.0%