adamayres / gulp-extend

A gulp plugin to extend (merge) json contents
https://npmjs.org/package/gulp-extend
MIT License
19 stars 6 forks source link

"Sorting" result by keys #4

Open setthase opened 9 years ago

setthase commented 9 years ago

I've noticed that this could be useful, i.e. if you trying to generate some files that then would land in version control systems, like git.

If we sort object by keys, then each time when we run gulp we could expect that diff tools will show only what really have changed. Currently each time I run gulp on three files I've got different result and my git is shouting on me that I've changed whole file, when I didn't touch JSON files at all.

I know that by definition JS Objects don't have an order, but in practice V8 implementation is keeping keys in the order they were added.

webcaetano commented 8 years ago

+1.