sensible, less verbose browserify .deps output
If you've tried to output the result of browserify .deps()
, you'll realise the output is barely comprehensible - there's too much being printed! That's because browserify (actually, module-deps, which browserify use under the hood) includes the 'source'
field in the json stream.
If you want to try this out, here's a simple setup:
Running node browserify-deps-ex.js
will output the dependences (verbosely). Shameless plug: setup and run Node on Nitrous.io faster than you can leave for Mars. If you aren't already on Nitrous.io, sign up via this referral link to give me some love!
We can omit the 'source'
key by placing another stream in the pipeline. We do so via through2, which seems to be the de facto way to do it.