This adds support for global generators by adding the global node_modules path to the lookups.
@sindresorhus I would like to land this, but I'm wondering if a more complex solution is required. This does however work. Nice work, @kevva :)
My concern is that '../../../..' feels a bit fragile, but from looking at it, it does seems to solve the problem, and I can't think of anything more elegant atm.
I will try it out on OS X, but it also needs to be tested on Linux and Windows. Anyone want to help out testing this?
Sure, will do some tests on Linux.
@sindresorhus, works on OS X and Windows, for me atleast. Sure, seems fragile, but it guarantees that it works across all OS since the node_modules dir is always four levels up from env.js, no matter what OS you're on. I'm not sure there's a better way to lookup the global node_modules.
Works fine for me on Linux, too. Maybe you could add what you just explained as a comment, @kevva. :)
Add support for global generators
Ensures support across all OS since the `node_modules` dir always is four
levels up from `env.js`.
awesome! @kevva thanks for this, glad we could get this fixed.