A CLI file difference checker written in Go.
You need Go installed on your device in order to install this utility.
go get github.com/webhooked/filediff
filediff file1.css file2.css
Please note that the file checker takes any type of file, meaning it is not limited to JavaScript files as shown in the example below.
Let's say we have two React components (JS-files) that we want to compare.
function App() {
return (
<div className="App">
<header className="large-header">
<img src={logo} className="logo" alt="logo" />
<p>
Edit <code>src/App.js</code> and save to reload.
</p>
</header>
</div>
);
}
function Home() {
return (
<div className="Home">
<header className="large-header">
<img src={logo} className="logo" alt="logo" />
<h1>
Edit <code>src/Home.js</code> and save to reload.
</h1>
</header>
</div>
);
}
We use FileDiff to display the differences.
filediff component1.js component2.js
FileDiff then provides us with the following result:
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.