diff --git a/README.md b/README.md index 9999acf78..cf75ea620 100644 --- a/README.md +++ b/README.md @@ -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 +taskWatch()->monitor('composer.json', function() { + $this->taskComposerUpdate()->run(); + })->run(); + } +} +?> +``` + + ### Example: Cleaning Logs and Cache ``` php @@ -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 -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: