Utilities for dealing with a backbase collection of components.
npm install @backbase/collection#### .listDependencies(sourcesDir)
Returns a full list of dependencies of the collection, ordered by the dependency tree with the
top most dependencies first.
Currently only supports bower dependencies. The bower dependencies need to be installed, and are
retrievied from bower list.
Returns array in format:
```
[
{
name:
srcDir:
version:
dependencies: {
name:
srcDir:
version:
dependencies: {
...
}
},
...
}
},
...
]
#### .listSources(sourcesDir)
Returns a full list of CXP sources found in sourcesDir, excluding anything in bower_components
or node_modules.
Folders are determined to be CXP sources if they contain a model.xml.
Returns array in format
``
[
{
name:
srcDir:
version:
type:
},
...
]
The array is ordered by templates, containers, features, then widgets.
#### .listItem(sourceDir)
Returns a single item loaded from the sourceDir.
Throws an error if folder desn't have model.xm.
Because of some weird bug with babel I haven't figured out yet, to run the coverage you need
to delete the .babelrc file. You can get the coverage like this:
`bash``
mv .babelrc .babelrc.bak && make coverage && mv .babelrc.bak .babelrc