3 ms·
If you have any kind of JS minification in your pipeline, then just applying git diff is likely to produce large patches for small changes as renaming and compi
by cromwellian 13y ago
If you have any kind of JS minification in your pipeline, then just applying git diff is likely to produce large patches for small changes as renaming and compiler optimizations on Javascript can vary wildly.
Google has had diff tools like this for awhile, as such, the Closure Compiler contains a feature called stable name maps to prevent a small change from causing all of the symbols globally to be minified differently. It's outputs two files of variable and property names, and subsequent compilers can attempt to minimize diff-cheese. They also help SDCH.
https://groups.google.com/forum/#!topic/closure-compiler-discuss/MrENQdmovSE https://groups.google.com/forum/#!topic/closure-compiler-dis...
- diurnalist 13y agoDynoSRC will actually insert white space into minified files before doing the diff so it can still do line diffs. We were and are concerned about the overhead of a diff on the minfication use-case, but it's promising that some minifiers like Closure have settings you can use to ensure that two versions of a file will match up relatively well when minified. Thanks for the link!