graze / console-diff-renderer
only write output to a console that has changed
Installs: 121 287
Dependents: 4
Suggesters: 3
Security: 0
Stars: 5
Watchers: 12
Forks: 8
Open Issues: 3
Requires
- php: ^5.6 | ^7.0
- symfony/console: ^2.8 | ^3.2 | ^4.0
Requires (Dev)
- graze/standards: ^2.0
- mockery/mockery: ^1
- phpunit/phpunit: ^5.7.21 | ^6 | ^7
- squizlabs/php_codesniffer: ^3
README
Only render things that have changed to the console.
Usage
$output = new DiffConsoleOutput($existing); $output->reWrite([ 'first line', 'second line', ]); $output->reWrite([ 'first line here', 'second line', ]);
This will navigate the cursor to the end of first line
and write here
then navigate the cursor back to the end.
- Supports Formatting
- Supports ANSI control codes
- Will wrap around based on the terminal size
- Can trim based on the terminal size
- Will only write the number of lines that are visible to the user
Install
Via Composer
$ composer require graze/console-diff-renderer
Development
$ make build
Testing
$ make test
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email security@graze.com instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.