nikitovskij/php-gendiff

用于查找配置文件差异的命令行工具。

v0.7.2 2020-11-04 14:47 UTC

README

PHP GenDiff Project Status: Active – The project has reached a stable, usable state and is being actively developed. Maintainability Test Coverage

这是一个确定两个数据结构之间差异的程序。

实用功能

  • 支持不同的输入格式:yaml 和 json
  • 生成纯文本、样式化文本和 json 格式的报告

要求

设置

$ git clone https://github.com/nikitovskij/php-gendiff.git

$ make install

Composer

$ composer require nikitovskij/php-gendiff

测试

$ make test

代码检查

$ make lint 

示例

php-gendiff: json

$ gendiff /path/to/file/first.json /path/to/file/second.json

查看 asciinema

php-gendiff: yml

$ gendiff /path/to/file/first.yml /path/to/file/second.yml

查看 asciinema

php-gendiff: 美化格式输出

默认设置是 美化 输出格式。

$ gendiff /path/to/file/first.json /path/to/file/second.json

or

$ gendiff --format pretty /path/to/file/first.json /path/to/file/second.json

查看 asciinema:asciinema

php-gendiff: 纯文本格式输出

$ gendiff --format plain /path/to/file/first.json /path/to/file/second.json

查看 asciinema

php-gendiff: json 格式输出

$ gendiff --format json /path/to/file/first.json /path/to/file/second.json

查看 asciinema