Last active
March 4, 2025 03:17
-
-
Save ainsofs/d45fa6b54ec4675ade257d993b5f8281 to your computer and use it in GitHub Desktop.
Composer helper scripts for Drupal
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"scripts": { | |
"build": [ | |
"drush site:install minimal --existing-config --db-url=mysql://root:password@mariadb:3306/drupal -y", | |
"drush cr" | |
], | |
"build2": [ | |
"drush site:install --existing-config --db-url=mysql://root:password@mariadb:3306/drupal -y", | |
"drush cr" | |
], | |
"build3": [ | |
"@generate_salt", | |
"drush si -y", | |
"drush cset system.site uuid \"5bb79423-cfb5-4dd1-98fc-1efb2a54c645\" -y", | |
"drush entity:delete shortcut_set", | |
"drush cim -y", | |
"drush php-eval 'node_access_rebuild();'" | |
], | |
"drupal:update": [ | |
"composer update drupal/core* -W", | |
"drush cr", | |
"drush updb -y", | |
"drush cex -y" | |
], | |
"php_compatibility": [ | |
"phpcs -p --standard=PHPCompatibility --extensions=php,inc,module,install --runtime-set testVersion 8.2 /var/www/html/drupal/web/modules/custom", | |
"phpcs -p --standard=PHPCompatibility --extensions=php,inc,theme,install --runtime-set testVersion 8.2 /var/www/html/drupal/web/themes/custom" | |
], | |
"coding_standards": [ | |
"phpcs --standard=Drupal --extensions=php,module,inc,install /var/www/html/drupal/web/modules/custom", | |
"phpcs --standard=Drupal /var/www/html/drupal/web/themes/custom --ignore=*/node_modules/*,*.css,*.js,includes/*" | |
], | |
"coding_standards_fix": [ | |
"phpcbf --report=diff --extensions=php,module,inc,install --standard=Drupal /var/www/html/drupal/web/modules/custom", | |
"phpcbf --report=diff --standard=Drupal /var/www/html/drupal/web/themes/custom --ignore=*/node_modules/*,*.css,*.js,includes/*" | |
], | |
"drupal_check": [ | |
"drupal-check /var/www/html/drupal/web/*/custom" | |
], | |
"generate_salt": [ | |
"drush php-eval 'echo \\Drupal\\Component\\Utility\\Crypt::randomBytesBase64(55)' > salt.txt" | |
], | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
settings.php - https://gist.github.com/ainsofs/089b67215bd221f520e46893a5ff0d36