prod
Asynchronous node module dependency tree walking framework.
Easily perform a kitchen sink of asynchronous operations on each item in a module's dependency tree.
Example
Put individual names and versions of all dependencies in some db by walking over the tree using an async .map
:
var prod = var moduleRoot = path })
API
// pass any module's root directory to walk over it and it's dependenciesvar tapeDependencies = var myDependencies = // defaults to process.cwd() Object // => // each, eachSeries, eachLimit, map, ...etc.// See below.
prod
uses timoxley/async-mixin, so you automatically have access to the following
methods from caolin/async while iterating over your dependency tree:
- each
- eachSeries
- eachLimit
- map
- mapSeries
- mapLimit
- filter
- filterSeries
- reject
- rejectSeries
- reduce
- reduceRight
- detect
- detectSeries
- sortBy
- some
- every
- concat
- concatSeries
If you don't want any of this async magic, you can simply initialize
prod with .load and use regular Array operations on its .dependencies
var myDependencies =
Alternatively, you could try using read-installed with traverse
License
MIT