Skip to content
/ GenDiff Public

Console utility shows the difference between files .json/yaml/ini on Node.js

Notifications You must be signed in to change notification settings

kcelsi/GenDiff

Repository files navigation

Node CI Maintainability Test Coverage Dependency Status devDependency Status time tracker


During the creation of the project, I learned:


  • To write tests on Jest
  • Read files on Node.js
  • Parsing data from json, yml, ini
  • Build AST and work with it
  • Working with recursion
  • Building an application interface based on the library commander.js


About

This program for working in the console, which allows to detect differences between three data formats (json, yml, ini) and output them in three different styles ('stylish', 'plain text' and 'json'). You can use different file formats for comparison (for example, json and ini).

Installation

You can install gendiff with npm or build it from source.
You must have node.js installed on your computer (version 14.0 or higher).

npm package

To install gendiff using npm run

npm i -g gendiff-gkoil

build

  1. Clone the project on your computer
    git clone git@github.com:GKoil/GenDiff.git
    
  2. Install dependencies
    npm i
    
  3. Build this project
    make publish
    
  4. Install it
    make link
    

Usage

Type gendiff in the console and pass the path parameters to the files

gendiff ~/project1/before.json ~/project2/after.json

Also you can youse difference output formats

Options

-V
Find out the version
Example:

gendiff -V

-h
Get help in console
Example:

gendiff -h

-f
Choose output stylish format.
Example:

gendiff -f plain file1.json file2.json

Examples

Stylish

Stylish formatter

Plain

Plain formatter

JSON

JSON formatter

About

Console utility shows the difference between files .json/yaml/ini on Node.js

Topics

Resources

Stars

Watchers

Forks

Packages