I need to compare two minimized Javascript files. Most common diff viewers list differences per line, but this isn't useful when the script is compressed to a few lines.
Are there any good tools for comparing minimized Javascript files?
I need to compare two minimized Javascript files. Most common diff viewers list differences per line, but this isn't useful when the script is compressed to a few lines.
Are there any good tools for comparing minimized Javascript files?
Pretty Diff tool will diff two minified files or a minified to a beautified file with a single button click.
It operates by first minifing files to remove comments and the beautifies the source code before running its diff algorithm. This is my tool, so if this does not do what you need I do take requests.
Compressed java script files may not be compared directly. First format both the java script codes using java script beautifier. Then you can compare using any of the below tools:
Tools to compare the code:
Tools to Format the Javascript: 1. JavaScriptBeautifier.com
All above tools are available on internet and can be searched and downloaded on google.
Our SmartDifferencer tool compares the code using the language syntax rather than text lines. By doing this, it isn't sensitive to or bollixed by formatting or minification.
It doesn't print "lines" containing differences; rather it prints out the code fragment which is different, whether that fragment covers several lines or is only a fragment in a current line. So it would probably do a good job of this.
There is a SmartDifferencer specific to each language, and in particular there is one for JavaScript.