Skip to content

Commit

Permalink
Touch up documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
greg-1-anderson committed Sep 15, 2016
1 parent f4dad33 commit 67f5bdf
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 22 deletions.
6 changes: 3 additions & 3 deletions docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ Help:

Arguments and options are populated from annotations.

Initially added with [PR by @jonsa](https://github.com/consolidation-org/Robo/pull/71); now provided by the [consolidation/annotated-command](https://github.com/consolidation-org/annotated-command) project, which was factored out from Robo.
Initially added with [PR by @jonsa](https://github.com/consolidation/Robo/pull/71); now provided by the [consolidation/annotated-command](https://github.com/consolidation/annotated-command) project, which was factored out from Robo.

### Ignored methods

Expand Down Expand Up @@ -324,7 +324,7 @@ This allows Robo scripts to follow the [Symfony Console Style Guide](http://symf

### Formatters

It is preferable for commands that look up and display information should avoid doing IO directly, and should instead return the data they wish to display as an array. This data can then be converted into different data formats, such as "table" and "json". The user may select which formatter to use via the --format option. For details on formatters, see the [consolidation/output-formatters](https://github.com/consolidation-org/output-formatters) project.
It is preferable for commands that look up and display information should avoid doing IO directly, and should instead return the data they wish to display as an array. This data can then be converted into different data formats, such as "table" and "json". The user may select which formatter to use via the --format option. For details on formatters, see the [consolidation/output-formatters](https://github.com/consolidation/output-formatters) project.

### Progress

Expand Down Expand Up @@ -415,4 +415,4 @@ If you would like to simplify the output of your script (e.g. when running on a

## Robo as a Framework

For an overview on how to turn your Robo scripts into standalone tools, see the section [Robo as a Framework](framework.md).
For an overview on how to turn your Robo scripts into standalone tools, see the example [robo.script](https://github.com/consolidation/Robo/blob/master/examples/robo.script), and the section [Robo as a Framework](framework.md).
3 changes: 1 addition & 2 deletions examples/RoboFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,7 @@ public function tryFormatters($options = ['format' => 'table', 'fields' => ''])
[ 'first' => 'Ichi', 'second' => 'Ni', 'third' => 'San' ],
[ 'first' => 'Uno', 'second' => 'Dos', 'third' => 'Tres' ],
];
// Note that we can also simply return the output data array here.
return ResultData::message(new RowsOfFields($outputData));
return new RowsOfFields($outputData);
}

/**
Expand Down
19 changes: 2 additions & 17 deletions script.robo → examples/robo.script
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@
*
* Example:
*
* $ ./script.robo foo bar
* $ ./robo.script foo bar
* ➜ This is a Robo script, bar
*
* If the script has only one command, then you may remove the need to
* specify it on the commandline by naming it on the `#!` line.
*
* e.g. if the first line is `#!/usr/bin/env robo foo`:
*
* $ ./script.robo bar
* $ ./robo.script bar
* ➜ This is a Robo script, bar
*
* Note that in order for Robo scripts to work, the 'robo' application
Expand All @@ -41,19 +41,4 @@ class MyRoboScript extends \Robo\Tasks
{
$this->say("This is a Robo script, $name");
}

/**
* Load any external Robo tasks
*
* e.g. after `composer global require externalproject/extra`:
*
* return
* [
* \ExternalProject\Task\Extra\loadTasks::getExtraServices(),
* ];
*/
public function getServiceProviders()
{
return [];
}
}

0 comments on commit 67f5bdf

Please sign in to comment.