npm.io
1.0.0 • Published 6 years agoCLI

cli-gen_diff

Licence
ISC
Version
1.0.0
Deps
4
Size
15 kB
Vulns
0
Weekly
0

PROJECT 'Generate difference'

Build Status Maintainability Test Coverage

gendiff compares two configuration files and shows difference. The package can be used as CLI utility or Node.js package that can be used in your project.

gendiff supports file extensions such as json, yaml, yml, ini. It can output the result in 'tree' and 'plain' formats. It's also possible to output in json format for data exchange using the json option. You can select the output format by setting the option flag -f (--format). By default output format 'tree'.

For example:

$ gendiff --format plain project/configurations/before.json project/configurations/after.json

or

$ gendiff project/configurations/before.ini project/configurations/after.ini

asciicast asciicast asciicast asciicast

Setup

$ git clone https://github.com/portal-x/backend-project-lvl2.git
$ make install
$ npm link

gendiff module for node.js

$ npm install gendiff

API

gendiff supports file extensions such as json, yaml, yml, ini. It can output the result in 'tree' and 'plain' formats. It's also possible to output in json format for data exchange. Set the json in parameter. By default output format 'tree'.

For example:

import gendiff from 'gendiff';

const diff = gendiff('./forExample/before.json', '/user/documents/after.json', 'json');