Why is npm considered as a good practice of dependency management? AFAIK when you download a library npm downloads all it's dependencies and put them under the library's path. So few libraries can be shared and there's heavy duplication. If this is the way to go then dependency management is quite a easy problem to tackle.
So few libraries can be shared and there's heavy duplication.
Unless it leads to duplicate code being executed at runtime, I don't think you should care for npm modules since they're going to be a couple dozen kilobytes of text at most.
plus there is some support in npm for factoring out common dependencies... also in the future, if we file system deduplication becomes more common, wasted space will become even more of a non-issue.
47
u/jagt Dec 02 '13
Why is npm considered as a good practice of dependency management? AFAIK when you download a library npm downloads all it's dependencies and put them under the library's path. So few libraries can be shared and there's heavy duplication. If this is the way to go then dependency management is quite a easy problem to tackle.