## Members

<dl>
<dt><a href="#default">default</a> ⇒ <code>Object</code></dt>
<dd><p>Load and return all configuration options.</p>
</dd>
<dt><a href="#cliConfig">cliConfig</a> ⇒ <code>Object</code></dt>
<dd><p>Given a commander CLI definition, return config options matching the CLI options.</p>
</dd>
<dt><a href="#files">files</a> ⇒</dt>
<dd><p>Return full paths to current configuration files paths.</p>
</dd>
</dl>

## Typedefs

<dl>
<dt><a href="#BBConfigFiles">BBConfigFiles</a> : <code>Object</code></dt>
<dd></dd>
</dl>

<a name="default"></a>

## default ⇒ <code>Object</code>
Load and return all configuration options.

**Kind**: global variable  

| Param | Type | Description |
| --- | --- | --- |
| profile | <code>String</code> | Profile to use. If not given the profile will be detected. |

**Example**  
```javascript
import bbConfig from '@bb-cli/bb-config';
console.log(bbConfig()); // JSON config object
```
<a name="cliConfig"></a>

## cliConfig ⇒ <code>Object</code>
Given a commander CLI definition, return config options matching the CLI options.

**Kind**: global variable  

| Param | Type | Description |
| --- | --- | --- |
| cli | <code>Object</code> | Commander CLI |
| command | <code>String</code> | The command to load config for. Eg "bb-serve" |
| subCommand | <code>String</code> | The sub-command to load config for. Eg "project" |
| profile | <code>String</code> | Profile to use. If not given the profile will be detected. |

**Example**  
```javascript
import { cliConfig } from '@bb-cli/bb-config';

// Setup command bb-foo baa
import { cli } from '@bb-cli/base';
cli
 .option('--option-one [foo]', 'Some option')
 .option('--option-two [baa]', 'Some other option')
 .parse(process.argv);

const bbConf = cliConfig(cli, 'bb-foo', 'baa');

console.log(bbConf); // { optionOne: "val1", optionTwo: "val2" }
```
<a name="files"></a>

## files ⇒
Return full paths to current configuration files paths.

**Kind**: global variable  
**Returns**: BBConfigFiles  
<a name="BBConfigFiles"></a>

## BBConfigFiles : <code>Object</code>
**Kind**: global typedef  
**Properties**

| Name | Type | Description |
| --- | --- | --- |
| global | <code>String</code> | The location of the global configuration file |
| local | <code>String</code> | The location of the local configuration file |

