Usher is intended for use on Chromatic repositories to supplement the use of the Robo PHP task runner. It contains a number of commands to assist in development, builds, and deployments, and can be extended in downstream repos.
- ush·er (verb): to show or guide (someone) somewhere.
- ush·er (noun): American singer, songwriter, businessman, and dancer.
composer require chromatic/usher
- Create a
robo.yml
file in the root of your codebase.robo.drupal.example.yml
is provided as a starting point for Drupal projects. - Create a
.sites.config.yml
file in the root of your codebase. See.sites.config.example.yml
for reference on what can/should be configured. - Add the following to your repo's
composer.json
"scripts" section so that you can call robo easily withcomposer robo
:
"scripts": {
"robo": "robo --ansi"
}
The dev:refresh
command (often available in downstream repos as
composer robo dev:refresh SITENAME
) refreshes your local Lando environment
which includes:
composer install
lando start
- Theme build (
robo theme:build
). - Disabling front-end caches.
- Downloading the most recent database dump.
- Importing the database dump.
drush deploy
- Generating a login link.
You can use this package for the basics and then build upon it. New commands
that are relevant only to a single repo should be added to a top-level /robo
directory in the project repo. Commands should live at /robo/src/Robo/Plugin/Commands/
.
Add a new autoload namespace to composer.json
so these commands will be
detected:
"autoload": {
"psr-4": {
"YOURPREFIXRobo\\": "robo/src"
}
}
If you have a new command that would be useful to multiple repositories that use
this package, create a new command here under /src/Robo/Plugin/Commands
via a
pull request.