mirror of
https://github.com/n3w/helpers-functions-cli.git
synced 2025-12-19 12:43:22 +00:00
Updated README and CHANGELOG for 1.1.3 release
This commit is contained in:
parent
cfc256347d
commit
627406241e
2 changed files with 31 additions and 19 deletions
11
CHANGELOG.md
11
CHANGELOG.md
|
|
@ -5,9 +5,14 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
||||||
|
|
||||||
**View all [Unreleased][] changes here**
|
**View all [Unreleased][] changes here**
|
||||||
|
|
||||||
|
## [1.1.3][]
|
||||||
|
#### Changed
|
||||||
|
- Updated `manpage()` to include `foregroundColour`, `headingColour`, and `additional` arguments. Removed `example` argument in favour of including it inside `additional`.
|
||||||
|
- Added `pointybeard/helpers-cli-colour` composer package
|
||||||
|
|
||||||
## [1.1.2][]
|
## [1.1.2][]
|
||||||
#### Changed
|
#### Changed
|
||||||
- Using latest version of `pointybeard/helpers-functions-strings`
|
- Using latest version of `pointybeard/helpers-functions-strings`
|
||||||
|
|
||||||
## [1.1.1][]
|
## [1.1.1][]
|
||||||
#### Added
|
#### Added
|
||||||
|
|
@ -25,6 +30,8 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
||||||
#### Added
|
#### Added
|
||||||
- Initial release
|
- Initial release
|
||||||
|
|
||||||
[Unreleased]: https://github.com/pointybeard/helpers-functions-cli/compare/1.1.1...integration
|
[Unreleased]: https://github.com/pointybeard/helpers-functions-cli/compare/1.1.3...integration
|
||||||
|
[1.1.3]: https://github.com/pointybeard/helpers-functions-cli/compare/1.1.2...1.1.3
|
||||||
|
[1.1.2]: https://github.com/pointybeard/helpers-functions-cli/compare/1.1.1...1.1.2
|
||||||
[1.1.1]: https://github.com/pointybeard/helpers-functions-cli/compare/1.1.0...1.1.1
|
[1.1.1]: https://github.com/pointybeard/helpers-functions-cli/compare/1.1.0...1.1.1
|
||||||
[1.1.0]: https://github.com/pointybeard/helpers-functions-cli/compare/1.0.0...1.1.0
|
[1.1.0]: https://github.com/pointybeard/helpers-functions-cli/compare/1.0.0...1.1.0
|
||||||
|
|
|
||||||
39
README.md
39
README.md
|
|
@ -1,7 +1,7 @@
|
||||||
# PHP Helpers: Command-line Functions
|
# PHP Helpers: Command-line Functions
|
||||||
|
|
||||||
- Version: v1.1.2
|
- Version: v1.1.3
|
||||||
- Date: May 23 2019
|
- Date: May 24 2019
|
||||||
- [Release notes](https://github.com/pointybeard/helpers-functions-cli/blob/master/CHANGELOG.md)
|
- [Release notes](https://github.com/pointybeard/helpers-functions-cli/blob/master/CHANGELOG.md)
|
||||||
- [GitHub repository](https://github.com/pointybeard/helpers-functions-cli)
|
- [GitHub repository](https://github.com/pointybeard/helpers-functions-cli)
|
||||||
|
|
||||||
|
|
@ -18,9 +18,9 @@ And run composer to update your dependencies:
|
||||||
|
|
||||||
### Requirements
|
### Requirements
|
||||||
|
|
||||||
This library makes use of the [PHP Helpers: Command-line Input and Input Type Handlers](https://github.com/pointybeard/helpers-cli-input), [PHP Helpers: Flag Functions](https://github.com/pointybeard/helpers-functions-flags) (`pointybeard/helpers-functions-flags`) and [PHP Helpers: String Functions](https://github.com/pointybeard/helpers-functions-strings) packages. They are installed automatically via composer.
|
This library makes use of the [PHP Helpers: Command-line Input and Input Type Handlers](https://github.com/pointybeard/helpers-cli-input), [PHP Helpers: Flag Functions](https://github.com/pointybeard/helpers-functions-flags) (`pointybeard/helpers-functions-flags`), [PHP Helpers: Command-line Colour](https://github.com/pointybeard/helpers-cli-colours) (`pointybeard/helpers-cli-colours`) and [PHP Helpers: String Functions](https://github.com/pointybeard/helpers-functions-strings) packages. They are installed automatically via composer.
|
||||||
|
|
||||||
To include all the [PHP Helpers](https://github.com/pointybeard/helpers) packages on your project, use `composer require pointybeard/helpers` or add `"pointybeard/helpers": "~1.1"` to your composer file.
|
To include all the [PHP Helpers](https://github.com/pointybeard/helpers) packages on your project, use `composer require pointybeard/helpers` or add `"pointybeard/helpers": "~1"` to your composer file.
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
|
|
@ -43,6 +43,7 @@ declare(strict_types=1);
|
||||||
include __DIR__.'/vendor/autoload.php';
|
include __DIR__.'/vendor/autoload.php';
|
||||||
|
|
||||||
use pointybeard\Helpers\Cli\Input;
|
use pointybeard\Helpers\Cli\Input;
|
||||||
|
use pointybeard\Helpers\Cli\Colour\Colour;
|
||||||
use pointybeard\Helpers\Functions\Cli;
|
use pointybeard\Helpers\Functions\Cli;
|
||||||
|
|
||||||
var_dump(Cli\can_invoke_bash());
|
var_dump(Cli\can_invoke_bash());
|
||||||
|
|
@ -60,13 +61,12 @@ var_dump(Cli\get_window_size());
|
||||||
echo Cli\manpage(
|
echo Cli\manpage(
|
||||||
'test',
|
'test',
|
||||||
'1.0.0',
|
'1.0.0',
|
||||||
'A simple test command',
|
'A simple test command with a really long description. This is an intentionally very long argument description so we can check that word wrapping is working correctly. It should wrap to the window',
|
||||||
'php -f test.php -- import -vvv -d test.json',
|
|
||||||
(new Input\InputCollection())
|
(new Input\InputCollection())
|
||||||
->append(new Input\Types\Argument(
|
->append(new Input\Types\Argument(
|
||||||
'action',
|
'action',
|
||||||
Input\AbstractInputType::FLAG_REQUIRED,
|
Input\AbstractInputType::FLAG_REQUIRED,
|
||||||
'The name of the action to perform'
|
'The name of the action to perform. This is an intentionally very long argument description so we can check that word wrapping is working correctly'
|
||||||
))
|
))
|
||||||
->append(new Input\Types\Option(
|
->append(new Input\Types\Option(
|
||||||
'v',
|
'v',
|
||||||
|
|
@ -80,25 +80,30 @@ echo Cli\manpage(
|
||||||
'd',
|
'd',
|
||||||
'data',
|
'data',
|
||||||
Input\AbstractInputType::FLAG_OPTIONAL | Input\AbstractInputType::FLAG_VALUE_REQUIRED,
|
Input\AbstractInputType::FLAG_OPTIONAL | Input\AbstractInputType::FLAG_VALUE_REQUIRED,
|
||||||
'Path to the input JSON data'
|
'Path to the input JSON data.'
|
||||||
))
|
)),
|
||||||
|
Colour::FG_GREEN,
|
||||||
|
Colour::FG_WHITE,
|
||||||
|
[
|
||||||
|
'Examples' => 'php -f test.php -- import -vvv -d test.json'
|
||||||
|
]
|
||||||
).PHP_EOL;
|
).PHP_EOL;
|
||||||
|
|
||||||
// test 1.0.0, A simple test command
|
// test 1.0.0, A simple test command with a really long description. This is an intentionally very long argument description so we can check that word wrapping is working correctly. It should wrap to the window
|
||||||
// Usage: test [OPTIONS]... ACTION...
|
// Usage: test [OPTIONS]... ACTION...
|
||||||
//
|
//
|
||||||
// Mandatory values for long options are mandatory for short options too.
|
|
||||||
//
|
|
||||||
// Arguments:
|
// Arguments:
|
||||||
// ACTION The name of the action to perform
|
// ACTION The name of the action to perform. This is an
|
||||||
|
// intentionally very long argument description so we can check
|
||||||
|
// that word wrapping is working correctly
|
||||||
//
|
//
|
||||||
// Options:
|
// Options:
|
||||||
// -v verbosity level. -v (errors only), -vv (warnings
|
// -v verbosity level. -v (errors only), -vv
|
||||||
// and errors), -vvv (everything).
|
// (warnings and errors), -vvv (everything).
|
||||||
// -d, --data=VALUE Path to the input JSON data
|
// -d, --data=VALUE Path to the input JSON data.
|
||||||
//
|
//
|
||||||
// Examples:
|
// Examples:
|
||||||
// php -f test.php -- import -vvv -d test.json
|
// php -f test.php -- import -vvv -d test.json
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue