shama / napa

:wine_glass: A helper for installing stuff without a package.json with npm.
MIT License
412 stars 34 forks source link

Custom install folder #68

Closed KarolAltamirano closed 8 years ago

KarolAltamirano commented 8 years ago

What about adding possibility to change default installation folder from 'node_modules' to something else in 'napa-config':

"napa-config": { "install-folder": "web_modules" }

Why it could be useful?

For example webpack is set by default to search for modules in 'web_modules' and 'node_modules' directories. By installing all libraries available in npm to 'node_modules' and libraries that aren't published in npm to 'web_modules' we could use 'npm shrinkwrap' without any issues.

Not sure if this idea have some downsides but I think it could work well. What do you think?

shama commented 8 years ago

I would rather not as napa tries to stay inline with npm and they will never allow custom install folders. The benefit of only ever having a single install folder is tooling can make some big assumptions on dependencies. I fear if we allow custom install folders, existing tooling geared for npm won't be compatible.

This is one of the reasons I only use webpack at the app level and use Browserify on the module level.

KarolAltamirano commented 8 years ago

Yeah, make sense. Thanks for explanation, closing.