Gendiff programm compares two configuration of files and shows a difference. Function works with .json, .yaml, .yml formats.
- Make sure you have installed Node.js no lower version 12:
node -v
- Clone this repo:
https://github.com/nomadkyr/frontend-project-lvl2.git
- Get root folder of project, run the commands
make install
andmake link
Usage: gendiff [options] <filepath1> <filepath2>
Compares two configuration files and shows a difference.
Options:
-V, --version output the version number
-h, --help output usage information
-f, --format <type> output format
Gendiff can show the difference in three ways: stylish (default), plain and json.
gendiff --format plain __fixtures__/file1.json __fixtures__/file2.json
make test
make test-coverage
- Comparing flat files in .json format:
- Comparing flat files in .yaml/yml format:
- Comparing nested files in .json format:
- Showing work of
-h
option, comparing nested files using--format
option: