Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/droath/robo-google-lighthouse

Google lighthouse for Robo task runner.
https://github.com/droath/robo-google-lighthouse

Last synced: 7 days ago
JSON representation

Google lighthouse for Robo task runner.

Awesome Lists containing this project

README

        

# Robo Google Lighthouse

Run Google Lighthouse commands from the Robo task runner.

### Prerequisites
- Install node `brew install node`
- Install lighthouse `npm install -g lighthouse`

### Getting Started

First, you'll need to download the Robo Google Lighthouse library using composer:

```bash
composer require droath/robo-google-lighthouse
```

### Example

Output an HTML file of the performance results.

```php
taskGoogleLighthouse()
->setUrl($url)
->performanceTestOnly()
->setOutputPath($path)
->run();
```

Output an JSON file of the results.

```php
taskGoogleLighthouse()
->setUrl($url)
->setOutput('json')
->setOutputPath($path)
->run();
```

### Support

The majority of the `lighthouse` commands available in the [CLI tool](https://github.com/GoogleChrome/lighthouse#using-programmatically) are supported.
If you find any discrepancies, please feel free to open up a GitHub issue.