Skip to content

Dmitriy-SP/gendiff

Repository files navigation

gendiff

Actions Status CI

A package that compares two configuration files and shows a difference.

Description

A package that determines the difference between two configuration files and shows a difference. Supported JSON and YAML file formats. Уou can use both absolute and relative paths when accessing to files. Supported output formatters: stylish, plain and json. If you want to import as a function it looks like: genDiff(<filepath1>, <filepath2>, <formatName>), and its outcome is the string. For more information see examples.

Installation

git clone [email protected]:Dmitriy-SP/frontend-project-46.git
make install
npm link

Help

$ gendiff -h
Usage: gendiff [options] <filepath1> <filepath2>
Compares two configuration files and shows a difference.
Options:
  -V, --version        output the version number
  -f, --format <type>  output format (default: "stylish")
  -h, --help           display help for command

Examples

Flat JSON file:

Flat YAML file:

Nested files:

Available formatters

Submitted files:

file1.json file2.json file1.yml file2.yaml

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published