## Description
[Lighthouse](https://developers.google.com/web/tools/lighthouse)

## Goal
This is only a wrap from lighthouse to be easy to customize parameters.

## CI
If you want to know how to put it on CI: [lightit-ci](https://github.com/amanajas/lightit-ci)

## SETUP

***Threshold***
```json
{
    "performance": 100,
    "pwa": 60,
    "accessibility": 55,
    "best-practices": 90,
    "seo": 45
}
```
***Config***
```json
{
    "extends": "lighthouse:full",
    "settings": {
        "onlyCategories": ["performance", "accessibility", "best-practices", "seo", "pwa"],
        "budgets": [{
        "resourceCounts": [
            {"resourceType": "third-party", "budget": 0}
        ],
        "resourceSizes": [
            {"resourceType": "total", "budget": 100},
            {"resourceType": "script", "budget": 30}
        ]
        }]
    }
}
```

## INSTALL

```bash
npm install -g lightit
```

## RUN

Considering that the **Options** and **Threshold** files exist, execute the following command:
```bash
lightit --url=https://google.com
```

#### Other options

***Change threshold (required)***
```bash
lightit --url=https://google.com --th=threshold.json
```

***Add config option (optional)***
```bash
lightit --url=https://google.com --config=config.json
```

### Final result

<img src="https://i.ibb.co/3CbPGdx/Screenshot-2019-09-25-at-12-15-32.png" width="400" alt="Results" />
