jasny/robo-extensions

This package is abandoned and no longer maintained. No replacement package was suggested.

Custom tasks for RoboTask

v0.2.0 2015-08-24 00:25 UTC

This package is auto-updated.

Last update: 2022-03-22 22:46:55 UTC


README

Installation

composer require jasny\robo-extensions

Usage

class RoboFile extends Robo\Tasks
{
    use Jasny\Robo\loadTasks;
    
    ...
}

LessTask

A version of Robo\Task\Assets\Less that supports passing options and using uri_root for less.php.

  $this->taskLess(['www/less/main.less' => 'www/css/style.css'])
    ->compiler('less', [
       'base' => 'www',
       'strictMath' => true
    ])
    ->run();

BumpVersionTask

Bump the version in a json file.

Optionally the git tags are referenced to determine the new version.

  $this->taskBumpVersion('composer.json')
    ->inc('minor')
    ->run();

  $this->taskBumpVersion('composer.json')
    ->to('1.2.6')
    ->run();

  // `to` also works for 'major', 'minor' and 'patch'
  $this->taskBumpVersion('composer.json')
    ->to('minor')
    ->run();

  // Check the git tags
  $this->taskBumpVersion('composer.json')
    ->inc('patch')
    ->useGit()
    ->run();