项目作者: siniiitsa

项目描述 :
A CLI app to compare files with nested data
高级语言: JavaScript
项目地址: git://github.com/siniiitsa/gendiff.git
创建时间: 2020-03-16T15:51:49Z
项目社区:https://github.com/siniiitsa/gendiff

开源协议:

下载


Gendiff

A CLI application that compares two configuration files, then computes a difference between them and shows it in the terminal, similar to git diff command.

Node CI
Maintainability
Test Coverage

How to install

To install gendiff on your computer, you should:

  1. Download or clone this repository
  2. Open a terminal window in the project folder and run:
  1. npm link

This will install Gendiff as a global npm package you can run in a terminal window.

How to use

Gendiff supports json, yaml and ini file formats. To generate the difference between two files, you need to go to your terminal window and type in:

  1. gendiff file1.json file2.json

Note that Gendiff accepts both relative and absolute paths. By default Gendiff will output the difference in a tree-like format. You can change the output format providing an optional —format option with a specific format name:

  1. gendiff --format tree file1.ini file2.ini
  2. gendiff --format plain file1.json file2.json
  3. gendiff --format json file1.yml file2.yml

Nothing prevents you from comparing two files of different formats, like this:

  1. gendiff file1.yml file2.json
  2. gendiff file1.ini file2.yaml

To access gendiff help, run this:

  1. gendiff --help