Allow installing packages from git subdirectories

Migrating here this feature request from npm/npm on GitHub:

https://github.com/npm/npm/issues/2974

PS: that issue will show up in search results for a long while, given its number of :+1:s, :heart:s and comments. It would be great if the original post were amended to point to this thread (might require un-archiving the repo temporarily but I think it’s worth the effort).

I cannot stress enough both the need for this feature, but also the fact that it took me quite some time to see what is the status of this feature because the original repository got archived and there is no followup there. Linking to here would be really useful. (Probably true for many issues there.)