gulpjs / liftoff

Launch your command line tool with ease.
MIT License
843 stars 52 forks source link

Support loading from NODE_PATH, fixes tkellen/node-liftoff#28 #44

Closed Meroje closed 9 years ago

Meroje commented 9 years ago

This will pass NODE_PATH to resolve.sync when looking for the module to require, or empty array if undefined (default for most people) which behaves the same.

heikki commented 9 years ago

Fails on windows because of this: .split(':')

Example path: C:\Users\IEUser\Desktop\GitHub\node-liftoff\explicit\cwd

tkellen commented 9 years ago

I'm conflicted about including this. It really belongs in resolve, but @substack refused a PR adding support for this here: https://github.com/substack/node-resolve/pull/47

Any thoughts @phated?

phated commented 9 years ago

If we have to use substack modules, then we should handle the case in our lib. Just make sure it works cross platform

heikki commented 9 years ago

http://nodejs.org/api/modules.html#modules_loading_from_the_global_folders

Note: On Windows, NODE_PATH is delimited by semicolons instead of colons

tkellen commented 9 years ago

Thanks @Meroje!

tkellen commented 9 years ago

released as 2.0.2

Meroje commented 9 years ago

Thanks for your quick answers on this