## Modules

<dl>
<dt><a href="#module_@bb-cli/lib-find-backbase-items">@bb-cli/lib-find-backbase-items</a></dt>
<dd><p>Finds CXP Items And Builds Sources</p>
</dd>
</dl>

## Functions

<dl>
<dt><a href="#itemFiles">itemFiles()</a> ⇒ <code>Array.&lt;string&gt;</code></dt>
<dd></dd>
<dt><a href="#mergeItems">mergeItems()</a> ⇒</dt>
<dd><p>Takes any number of arrays of CXP items and merges them all into a single array of CXP items.</p>
</dd>
</dl>

<a name="module_@bb-cli/lib-find-backbase-items"></a>

## @bb-cli/lib-find-backbase-items
Finds CXP Items And Builds Sources


* [@bb-cli/lib-find-backbase-items](#module_@bb-cli/lib-find-backbase-items)
    * _static_
        * [.findUnbuiltAndPrebuiltItems(unbuiltPaths, prebuiltPaths, exclude)](#module_@bb-cli/lib-find-backbase-items.findUnbuiltAndPrebuiltItems) ⇒ <code>Promise.&lt;FoundItems&gt;</code>
    * _inner_
        * [~CXPItem](#module_@bb-cli/lib-find-backbase-items..CXPItem) : <code>Object</code>
        * [~FoundItems](#module_@bb-cli/lib-find-backbase-items..FoundItems) : <code>Object</code>

<a name="module_@bb-cli/lib-find-backbase-items.findUnbuiltAndPrebuiltItems"></a>

### @bb-cli/lib-find-backbase-items.findUnbuiltAndPrebuiltItems(unbuiltPaths, prebuiltPaths, exclude) ⇒ <code>Promise.&lt;FoundItems&gt;</code>
Find unbuilt items, and prebuilt items.

**Kind**: static method of <code>[@bb-cli/lib-find-backbase-items](#module_@bb-cli/lib-find-backbase-items)</code>  
**Returns**: <code>Promise.&lt;FoundItems&gt;</code> - Array of items found  

| Param | Type | Description |
| --- | --- | --- |
| unbuiltPaths | <code>Array.&lt;string&gt;</code> | Paths to unbuilt sources |
| prebuiltPaths | <code>Array.&lt;string&gt;</code> | Array of paths to pre-built sources |
| exclude | <code>Array.&lt;string&gt;</code> | Array of paths to exclude from packaging |

**Example**  
``` javascript
import { findUnbuiltAndPrebuiltItems } from '@bb-cli/lib-find-backbase-items';
findAndBuild(['.'], ['node_modules'], ['target'])
  .then(({ unbuiltItems, prebuiltItems }) =>
    console.log(`${unbuiltItems.length} items to build`));
```
<a name="module_@bb-cli/lib-find-backbase-items..CXPItem"></a>

### @bb-cli/lib-find-backbase-items~CXPItem : <code>Object</code>
An object that describes a catalog item in CXP Manager.

**Kind**: inner typedef of <code>[@bb-cli/lib-find-backbase-items](#module_@bb-cli/lib-find-backbase-items)</code>  
**Properties**

| Name | Type | Description |
| --- | --- | --- |
| name | <code>string</code> | The CXP item name. |
| type | <code>string</code> | The CXP item type. |
| version | <code>string</code> | The CXP item version. |
| srcDir | <code>string</code> | The path to the item's source on the file system. |
| distDir | <code>string</code> | The path to the built code on the file system, if it was built. |
| files | <code>Array.&lt;string&gt;</code> | The files for this item |

<a name="module_@bb-cli/lib-find-backbase-items..FoundItems"></a>

### @bb-cli/lib-find-backbase-items~FoundItems : <code>Object</code>
An object that describes found CXP items.

**Kind**: inner typedef of <code>[@bb-cli/lib-find-backbase-items](#module_@bb-cli/lib-find-backbase-items)</code>  
**Properties**

| Name | Type |
| --- | --- |
| unbuiltItems | <code>Array.&lt;CXPItem&gt;</code> | 
| prebuiltItems | <code>Array.&lt;CXPItem&gt;</code> | 

<a name="itemFiles"></a>

## itemFiles() ⇒ <code>Array.&lt;string&gt;</code>
**Kind**: global function  
**Returns**: <code>Array.&lt;string&gt;</code> - The files for this item  
<a name="mergeItems"></a>

## mergeItems() ⇒
Takes any number of arrays of CXP items and merges them all into a single array of CXP items.

**Kind**: global function  
**Returns**: Array.<CXPItem>  

| Type |
| --- |
| <code>Array.&lt;CXPItem&gt;</code> | 

