Add support for global generators #188

Merged
merged 1 commit into from Mar 21, 2013

4 participants

@kevva
Yeoman member

This adds support for global generators by adding the global node_modules path to the lookups.

Reference #171.

@kevva
Yeoman member

@sindresorhus, thoughts?

@addyosmani
Yeoman member

@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 :)

@addyosmani addyosmani referenced this pull request Mar 20, 2013
Closed

Global generators #171

@sindresorhus
Yeoman member

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?

@passy
Yeoman member

Sure, will do some tests on Linux.

@kevva
Yeoman member

@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.

@passy
Yeoman member

Works fine for me on Linux, too. Maybe you could add what you just explained as a comment, @kevva. :)

@kevva kevva Add support for global generators
Ensures support across all OS since the `node_modules` dir always is four
levels up from `env.js`.
d7835ed
@kevva
Yeoman member

Done.

@sindresorhus sindresorhus merged commit ba9b1d6 into yeoman:master Mar 21, 2013

1 check passed

Details default The Travis build passed
@sindresorhus
Yeoman member

awesome! @kevva thanks for this, glad we could get this fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment