| The problem is that a lot of these js tools that are being built are being built on top of other hobbyist js libraries that are built on top of others that creates this weird chain of dependency that appears to arise from nothing other than the author's coding style preference. Take a look at just one of gulp's dependencies (and arguably one of the most important) vinyl-fs which it uses for file watching. This is the actual chain of abstractions for the file watching functionality in gulp. vinyl-fs < glob-watcher < gaze < graceful-fs * gulp.watch uses vfs.watch provided by vinyl-fs
* vfs.watch is actually just glob-watcher (lol)
* glob-watcher is a simple 20 line wrapper around gaze watch
* gaze uses graceful-fs to watch full paths
4 levels of library abstraction for file watching. Something that the built-in fs.watch handles natively.Here's the actual description of the gaze library "A globbing fs.watch wrapper built from the best parts of other fine watch libs." Yet apparently that wasn't enough as the gulp authors had to toss in 2 more layers on top of it. And at the end of the day gulp still sucks for watching files on linux. I understand that there are other pieces of vfs that are being used by gulp...but it still doesn't make any sense to me how there can be SOOO many accepted libraries dealing with just file watching. And instead of making a pull request for new features on existing libraries, developers are just building other libraries around them to do what they want. There's so much fragmentation in the JS world and no one can seem to ever agree to work together on anything. In comparison, in the Python world there's pretty much one agreed upon library for something like file watching "watchdog". There are alternatives but it stands out above all the rest. |