/drubo

Robo-based task runner for Drupal

Primary LanguagePHPMIT LicenseMIT

drubo

Robo-based task runner for Drupal 8


Installation

Use Composer to add drubo to your Drupal project:

$ composer require hctom/drubo --sort-packages

Getting started

Create RoboFile

To begin you need to create a RoboFile.php inside your project directory with the following code:

<?php
 
class RoboFile extends \Drubo\Robo\Tasks {

}

This file automatically inherits some useful built-in commands that help you with the setup/maintenance of your Drupal project.

NOTE: Please ensure that the \Drubo\Robo\Tasks namespace is used for the extended class - otherwise drubo functionality won't be available!

Initialize project

Run the following command to initialize your project:

$ vendor/bin/robo project:init

List available commands

From now on you may run vendor/bin/robo in your project directory to execute Robo-based drubo tasks. Use the following command to retrieve a list of all available commands:

$ vendor/bin/robo list

See commands documentation for details about built-in commands.


Recommended project structure

In order to have drubo work out of the box, the following directory structure should be used:

<project directory>
 ├─ .drubo
 |   ├─ config
 |   └─ ...
 ├─ .drupal
 |   ├─ backup
 |   ├─ config
 |   └─ ...
 ├─ bin
 ├─ docroot
 |   ├─ sites
 |   |   ├─ default
 |   |   |   ├─ files
 |   |   |   └─ ...
 |   |   └─ ...
 |   └─ ...
 ├─ private
 ├─ tmp
 ├─ vendor
 └─ ...

If you intend to use another structure, configure custom paths in your environment-specific configuration file(s).

See configuration documentation for details about overriding configuration values (also have a look at filesystem section in config.default.yml).

drubo searches for vendor binaries in bin by default (relative to the project directory) . Use the following snippet in your composer.json to tell Composer to use that specific directory for binaries:

"config": {
  "bin-dir": "bin"
}

Documentation