Description
The nested versus flat dependency tree argument is literally the only thing people regularly bring up as a reason to use Bower over npm. The only reply ever given is to use dedupe
, but there is no way to automate it. If npm is going to significantly improve adoption for client side use, I think this needs to change. You can't make the argument that people should use a different tool than they currently are while rejecting their top complaint about the tool being offered.
Currently, the primary hurdle to automating dedupe
is that running a command like npm install --save foo
does not trigger the postinstall
hook. (I personally think that should be considered a bug, but that is neither here nor there.) There also seem to be issues with the npm update
hook being inconsistent but I've yet to document their exact nature.
What it comes down to is there needs to be a way to run a command whenever the contents of node_modules
changes for any reason (as a result of an npm command). This could be used to run dedupe
for people worried about such things, or even something like lockdown.
I want npm to "win" as badly as anyone, but refusing to address this issue just seems like a non-starter.
/cc @isaacs @domenic @timoxley @kristoferjoseph @techwraith @robdodson @IgorMinar