# Tron

## Description/Goal
Consolidates chart and metrics to be displayed in a modular fashion.

## Prerequisites
- Node.js >= 4.0.0 (for ES2015 support)
- Python 2.7.x (Documentation)

## Usage

### Install

```
npm install
```

### Config
Copy and rename settings/server-default.json to settings/server.json.
Provide necessary config for remote endpoint(s) in settings/server.json.
You can provide multiple remotes.

```
"remotes": [{
    "path": "/forecast/:id", // path on application
    "controller": "videohub", // request and response handler
    "url": "path/to/api", // remote url to send request
    "auth": {
        "user": "user@domain.com",
        "password": "password"
    },
    "header": {
        "Accept": "application/json"
        "X-VHS-networkId": 1234
    }
}],
```

### Starting local server

```
npm start
```

_* Links below only work when local server is running_

### Documentation

#### Generate documentation

```
npm run doc
```

#### View documentation

* [Index](index.js.html) *
* [Models](model.js.html) *
* [Views](view.js.html) *
* [Interface](interface.js.html) *
* [Helpers](helper.js.html) *

#### Examples

* [Interactive Demo](/) *
* [Documentation of examples on Interactive Demo](example.js.html) *

### Test Coverage

#### Generate report

```
npm run test-coverage
```

#### Viewing the report

* [Test Coverage Report](/test-coverage) *

### Development

Build all assets

```
npm run build
```

Build only javascript

```
npm run browserify
```

Build only css styles

```
npm run less
```

### Contributors

Remember to do the following when publishing:

#### Document it
* Update CHANGELOG
* Update README if necessary
* Update version number in package.json according to [semver](http://semver.org/)

#### Test it
```
npm run test
```

#### Build it
```
npm run build
```

#### Publish it
```
npm publish
```
