Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/droath/robo-google-lighthouse
- Owner: droath
- Created: 2017-11-11T20:32:40.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2017-11-12T21:10:13.000Z (about 7 years ago)
- Last Synced: 2024-11-11T06:52:11.570Z (7 days ago)
- Language: PHP
- Size: 3.91 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
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.