Node.js module install location -
is possible install node_module outside of node_modules folder?
for example: i'm trying install gulp , have gulp in separate folder in workspace
workspace |-gulp |-node_modules | |- ... | |- ...
this possible, extremely ill-advised.
you hypothetically fork github repository , require('./gulp')
instead of require('gulp')
, doing give following fun , exciting challenges face:
you no longer have power of semantic versioning available through
npm
. , consumers of application locked exact (and arbitrary) commit ofgulp
decide fork, and...you have make pull-request , updates application's
gulp
dependency.you have commit dependency project.1 serves unnecessarily bloat application.
when loading application onto remote service limited resources (such limitation of memory or disk space), you'd wasting valuable real-estate potential performance enhancements such caching, etc.
if of above okay you, means feel free organize application's structure way. no one's stopping you!
while you're @ it, urge checked head injuries well.
1. have never done before, assume you'd have purge .git
directory within workspace/gulp
before you'd able this, can hassle of own.
Comments
Post a Comment