npm install neuron-treeUtilities to generate the config.tree for neuron.
```
// dependencies and async dependencies
// synchronous dependencies
{
},
// asynchronous dependencies
{
}
]
}
}
`bash`
$ npm install neuron-tree --save
`js`
var tree = require('neuron-tree');
tree(pkg, {
cwd: cwd,
built_root: built_root,
dependencyKeys: ['dependencies', 'asyncDependencies']
}, function(err, tree, shrinkwrap){
// ...
});
Generates the object tree which neuron uses as the config.tree.
- pkg Object cortex jsonObject
- options path
- cwd path=
- built_root the path from where we can find all installed and built packagesObject=
- shrinkwrap the object of cortex-shrinkwrap.jsonArray=['dependencies', 'asyncDependencies']
- dependencyKeys Boolean=false
- ignore_shrink_file if true, neuron-tree will always generate new shrinkwrap tree.
##### dependencyKeys
The array of types of dependencies, default to
``
[
"dependencies",
"asyncDependencies"
]
You could include other keys of dependencies in the array, available keys:
'dependencies', 'asyncDependencies', 'engines', devDependencies
##### Arguments Overloading
- if options.shrinkwrap not defined, then:options.ignore_shrink_file
- if not defined, neuron-tree will try to generate shrinkwrap itself, else:neuron-tree
- will try to read the cortex-shrinkwrap.json, else:neuron-tree
- if cortex-shrinkwrap.json not found, will try to generate shrinkwrap itself.
- shrinked Object the shrinked object of shrinkedArray.
- dependencyKeys
Parses the shrinked B+ tree, and generates a simpler tree for config.tree` of neuron.
MIT