Skip to content

Chi-teck/drupalrc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

73 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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

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

drush

Launcher for Drush.

drupalcs

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

drupalcs modules/custom/foo

d-phpcbf (d-cbf)

Automatically tries to fix PHPCS issues using PHPCBF tool.

d-phpcbf modules/custom/foo

dunit

Launcher for PHPUnit.

dunit tests/src/Functional/SomeTest.php

d-phpstan (d-stan)

Runs PHPStan analyze.

d-phpstan .

Note

If the local phpstan.neon file is not found, a contrib version of the file from Drupal CI will be downloaded to a temporary directory.

License

GNU General Public License, version 2.

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages