1.0.0 • Published 4 years ago
cli-gen_diff v1.0.0
PROJECT 'Generate difference'
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
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');
1.0.0
4 years ago