2017 © Pedro Peláez
 

library robo-tasks

Extra Tasks for the Robo Task Runner - http://robo.li/

image

brad-jones/robo-tasks

Extra Tasks for the Robo Task Runner - http://robo.li/

  • Thursday, February 25, 2016
  • by brad-jones
  • Repository
  • 1 Watchers
  • 8 Stars
  • 454 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 18 Versions
  • 0 % Grown

The README.md

Brads Additional Robo Tasks

Build Status Latest Stable Version Total Downloads License, (*1)

These are some tasks I have collated from various projects and generalised so I don't have to re invent the wheel for every new project I create., (*2)

All tasks are unit tested however there is plenty of room for improvement here so please use with caution., (*3)

If you have not come across the PHP Task Runner called Robo, see: http://robo.li/, (*4)

How to Use:

First up run the following:, (*5)

composer require brad-jones/robo-tasks

Assuming you already have robo installed, and you have a RoboFile.php., (*6)

Method 1: Extend my tasks class like so., (*7)

<?php

/*
 * NOTE: I wouldn't normally install robo globally. I use composer to install
 * it for me. However in some cases people still run a global version of robo.
 * Thus we require our local composer autoloader just in case.
 */
require_once(__DIR__.'/vendor/autoload.php');

class RoboFile extends Brads\Robo\Tasks
{
    public function someCommand()
    {
        // now my tasks are available
        $this->taskCreateDb()
            ->host('127.0.0.1')
            ->user('root')
            ->pass('')
            ->name('myapp_test')
        ->run();
    }
}

Method 2: Import my tasks as needed, like so., (*8)

<?php

require_once(__DIR__.'/vendor/autoload.php');

class RoboFile extends Robo\Tasks
{
    // import additional task
    use Brads\Task\CreateDb;

    public function someCommand()
    {
        $this->taskCreateDb()
            ->host('127.0.0.1')
            ->user('root')
            ->pass('')
            ->name('myapp_test')
        ->run();
    }
}

Developed by Brad Jones - brad@bjc.id.au, (*9)

The Versions