jackal / lighthouse-client
Installs: 40
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
pkg:composer/jackal/lighthouse-client
Requires
- php: >=7.1
- ext-json: *
- jackal/bin-locator: ^0.4
- symfony/options-resolver: ^3.4
- symfony/process: >=3.4
Requires (Dev)
- brainmaestro/composer-git-hooks: ^2.8
- friendsofphp/php-cs-fixer: ^2.15
- phpunit/phpunit: ^7.5
This package is auto-updated.
Last update: 2024-07-04 18:35:46 UTC
README
LighthouseClient
Requirements
To run, this package needs lighthouse installed on your system
Installation
composer require jackal/lighthouse-client
Usage
require_once __DIR__ . '/vendor/autoload.php';
$client = new \Jackal\Lighthouse\LighthouseClient([
'path' => __DIR__ . '/output.json',
'interactive' => false,
]);
$result = $client->run('https://www.google.com/');
echo "\n";
echo 'Performance: ' . $result->getPerformance() . "\n";
echo 'Accessibility: ' . $result->getAccessibility() . "\n";
echo 'Best Practices: ' . $result->getBestPractices() . "\n";
echo 'SEO: ' . $result->getSEO() . "\n";
echo 'Progressive app: ' . $result->getProgressiveWebApp() . "\n";