neuron-tree
![Dependency Status](https://gemnasium.com/cortexjs/neuron-tree.svg)
Utilities to generate the config.tree
for neuron.
<name>: {
<version>: {
// dependencies and async dependencies
<dep-name>: [
// synchronous dependencies
{
<sync-dep-range>: <sync-dep-version>
...
},
// asynchronous dependencies
{
<async-dep-range>: <async-dep-version>
...
}
]
}
}
...
Install
$ npm install neuron-tree --save
Usage
var tree = require('neuron-tree');
tree.parse(shrinked);
tree(cwd, pkg, [options], callback)
- cwd
- pkg
Object
cortex json - options
- built_root
path=
- shrinkwrap
Object=
tree.parse(shrinked, dependencyKeys)
-
shrinked Object
the shrinked object of shrinked
-
dependencyKeys Array.<type>
the array of types of dependencies, default to
[
"dependencies",
"asyncDependencies"
]
you could include other keys of dependencies in the array.
-
type String
available keys: 'dependencies'
, 'asyncDependencies'
, 'engines'
, devDependencies
Parses the shrinked B+ tree, and generates a simpler tree for config.tree
of neuron.
License
MIT