Skip to content

Commit

Permalink
updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
DavertMik committed Jan 29, 2014
1 parent 3b7eaf6 commit ffd9528
Showing 1 changed file with 20 additions and 19 deletions.
39 changes: 20 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,26 @@ To execute it you shoud run `robo test:acceptance`. You may change path to selen
robo test:acceptance "C:\Downloads\selenium.jar"
```

## Example: Run Composer Update on Change of `composer.json`

Actually this task is useless, but it demonstrates you of using `watch` task so you can use it for running tests or building assets.

``` php
<?php
class RoboFile extends \Robo\Tasks {
use \Robo\Task\Watch;

function watchComposer()
{
$this->taskWatch()->monitor('composer.json', function() {
$this->taskComposerUpdate()->run();
})->run();
}
}
?>
```


### Example: Cleaning Logs and Cache

``` php
Expand Down Expand Up @@ -207,25 +227,6 @@ To create new release we run:
[Robo\Task\GitHubReleaseTask] {"url":"https://api.github.com/repo...
```

## Example: Run Composer Update on Change of `composer.json`

Actually this task is useless, but it demonstrates you of using `watch` task so you can use it for running tests or building assets.

``` php
<?php
class RoboFile extends \Robo\Tasks {
use \Robo\Task\Watch;

function watchComposer()
{
$this->taskWatch()->monitor('composer.json', function() {
$this->taskComposerUpdate()->run();
})->run();
}
}
?>
```

## API

Tasks are classes that implement `Robo\TaskInterface` with method `run` defined. Each other method of task should be used for specifing task options and returns `$this` for fluent interface:
Expand Down

0 comments on commit ffd9528

Please sign in to comment.