jackal/lighthouse-client

此软件包已被废弃,不再维护。未建议替代软件包。
关于此软件包最新版本(v0.1.2)没有可用的许可证信息。

v0.1.2 2020-04-04 08:51 UTC

This package is auto-updated.

Last update: 2024-07-04 18:35:46 UTC


README

LighthouseClient

Latest Stable Version Total Downloads Latest Unstable Version License Scrutinizer Code Quality Build Status

需求

要运行,此软件包需要在您的系统上安装 lighthouse

安装

composer require jackal/lighthouse-client

用法

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";