17 янв. 2021 г.

Drupal 8. Drupal Console and Drush

Installation

https://hechoendrupal.gitbooks.io/drupal-console/en/index.html 

http://docs.drush.org/en/master/ 

https://www.webwash.net/drupal-cli-drush-and-drupal-console/


install drush via composer

$ composer global require drush/drush:dev-master

Установка с помощью приложения Composer

Перейти в папку с Drupal:

cd /path/to/drupal8.dev

Установка командой composer require:

composer require drupal/console:~1.0 \
--prefer-dist \
--optimize-autoloader

Скачать шаблон DrupalComposer

composer create-project \
drupal-composer/drupal-project:8.x-dev \
drupal8.dev \
--prefer-dist \
--no-progress \
--no-interaction

Обновить Drupal Console:

composer update drupal/console --with-dependencies

Установка пускового файла Drupal Console

С помощью командного приложения curl:

curl https://drupalconsole.com/installer -L -o drupal.phar
mv drupal.phar /usr/local/bin/drupal
chmod +x /usr/local/bin/drupal

ИЛИ если командное приложение curl не установлено

php -r "readfile('https://drupalconsole.com/installer');" > drupal.phar

Capabilities

https://github.com/hechoendrupal/drupal-console h

ttps://drushcommands.com/ 

https://pantheon.io/drupal-8/introduction-drush-and-drupal-console 

https://valuebound.com/resources/blog/developing-drupal-8-sites-a-smarter-way-drupal-console

Custom commands

https://hechoendrupal.gitbooks.io/drupal-console/en/extending/creating-custom-commands.html https://valuebound.com/resources/blog/how-to-write-custom-drush-commands-drupal-8 https://www.droptica.com/blog/your-own-drush-command-drupal-8/ https://drupalize.me/tutorial/drupal-console?p=2766 https://valuebound.com/resources/blog/power-of-drupal-console-in-drupal-8