# Introduction
Your contributions are very much welcome. The following article will help you get started as a contributor to this project.

### Ground Rules
* Code should be documented.
* Keep versions as small as possible.
* Add, remove, or change unit tests to match your work.
* Unit tests should pass before making pull requests.

# Getting Started
### Preliminary Dependencies
The following are needed before you get started.
- [Node](https://nodejs.org/en/)
- [Git](https://git-scm.com/)
- [Sass](https://sass-lang.com/)
- [Make](https://www.gnu.org/software/make/) (optional)

#### Clone the Repository
```bash
# Clone the repository
git clone https://github.com/massmutual/mmviz-web.git
```
#### Install Project Dependencies
```bash
# Navigate into the root folder
cd mmviz-web/

# Install the dependencies
npm install
```
#### Compilation and Other Tasks
**Make** is used to run frequent tasks. Install it, if you need to. Below are tasks run by **Make**.
```bash
# Build TypeScript for development
make scripts

# Build TypeScript for production
make scripts-dist

# Build Sass 
make styles

# Run tests and generate a coverage report
make test

# Generate documentation
make docs

# Publish to NPM
make publish
```

# Your Contribution
This project use a trunk based devops model. Your feature starts with a branch from the trunk, master.

#### Make Changes
- Branch off master
- Modify the repository. (Bug fix, add/remove feature, etc)
- Add or remove unit tests
- Run unit tests

#### Administrative Tasks
- Add to the change log
- Update semantic version

#### Code Review
- Create pull request
- Merge into master

#### Deployment Details
The CI/CD pipeline is defined in the Jenkinsfile.
- Failed builds will stop deployment.
- Failed tests will stop deployment.

## Development Notes
If you want your additions to be importable in another project
- Dont forget to [export](https://www.typescriptlang.org/docs/handbook/modules.html) your function or class
    ```typescript
    export function helloWorld() {}
    ```
- Don't forget to export your function or class in it's module index.ts file
    ```typescript
    export {helloWorld} from "./helloWorld";
    ```
- Execute `make scripts` to generate the js plus the types files.

