backend-project-lvl2-ifoxman
v3.0.0
Published
Compares two configuration files and shows a difference.
Downloads
4
Maintainers
Readme
backend-project-lvl2
Compares two configuration files and shows a difference
Installation
from github
git clone https://github.com/iFoxMan/backend-project-lvl2
cd backend-project-lvl2
make install
make build
npm link .
from npm
npm install -g backend-project-lvl2-ifoxman
Input data
gendiff support json, yml and ini files. For example these file pairs.
// before.json
{
"common": {
"setting1": "Value 1",
"setting2": 200,
"setting3": true,
"setting6": {
"key": "value"
}
},
"group1": {
"baz": "bas",
"foo": "bar",
"nest": {
"key": "value"
}
},
"group2": {
"abc": 12345
}
}
// after.json
{
"common": {
"follow": false,
"setting1": "Value 1",
"setting3": {
"key": "value"
},
"setting4": "blah blah",
"setting5": {
"key5": "value5"
},
"setting6": {
"key": "value",
"ops": "vops"
}
},
"group1": {
"foo": "bar",
"baz": "bars",
"nest": "str"
},
"group3": {
"fee": 100500
}
}
// before.yml
---
common:
setting1: 'Value 1'
setting2: 200
setting3: true
setting6:
key: 'value'
group1:
baz: 'bas'
foo: 'bar'
nest:
key: 'value'
group2:
abc: 12345
// after.yml
---
common:
follow: false
setting1: "Value 1"
setting3:
key: "value"
setting4: "blah blah"
setting5:
key5: "value5"
setting6:
key: "value"
ops: "vops"
group1:
foo: "bar"
baz: "bars"
nest: "str"
group3:
fee: 100500
// before.ini
[common]
setting1 = "Value 1"
setting2 = '200'
setting3 = 'true'
[common.setting6]
key = "value"
[group1]
baz = "bas"
foo = "bar"
[group1.nest]
key = "value"
[group2]
abc = '12345'
// after.ini
[common]
follow = 'false'
setting1 = "Value 1"
setting4 = "blah blah"
[common.setting3]
key = "value"
[common.setting5]
key5 = "value5"
[common.setting6]
key = "value"
ops = "vops"
[group1]
foo = "bar"
baz = "bars"
nest = "str"
[group3]
fee = '100500'
Output data
gendiff support stylish, plain and json format. For example these.
stylish
gendiff before.json after.json
or
gendiff --format stylish before.json after.json
plain
gendiff --format plain before.yml after.yml
json
gendiff --format json before.ini after.ini