Skip to content

AlexP11223/php-project-lvl2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status Maintainability Test Coverage

gendiff

Compares two JSON, YAML files and shows the changes between them in different formats: pretty, plain, json.

Installation

  • Install PHP 7.2+ and Composer.
  • Run composer global require alexp11223/gendiff.
  • Make sure that the Composer global bin dir (composer global config bin-dir --absolute) is in your PATH.

asciicast

Usage

gendiff [--format <fmt>] <firstFile> <secondFile>

Examples:

gendiff before.json after.json
gendiff before.yaml after.yaml
gendiff before.json after.yaml
gendiff before.json after.json --format plain
gendiff before.json after.json --format json

pretty

Human-readable JSON-like format similar to diff.

Flat files:

asciicast

Nested objects:

asciicast

plain

Textual description of the changes.

asciicast

json

JSON tree describing the changes, intended for automated processing.

asciicast

About

Compares two JSON, YAML files and shows the changes between them. Project 2 of https://hexlet.io courses.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published