suitmedia / frontend-lighthouse-audit
A PHP package to automate the Lighthouse Auditing for frontend development.
Installs: 5 892
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 4
Forks: 0
Open Issues: 0
Requires
- php: ^7.1.3
- symfony/console: ^4.2
- symfony/process: ^4.2
Requires (Dev)
- mockery/mockery: ~0.9.8
- phpmd/phpmd: ^2.6
- phpstan/phpstan: ^0.11.2
- phpstan/phpstan-deprecation-rules: ^0.11.0
- phpunit/phpunit: ~7.0
- sebastian/phpcpd: ^4.1
This package is auto-updated.
Last update: 2024-11-17 18:45:14 UTC
README
Frontend Lighthouse Audit
A simple tool to audit all of the frontend HTML templates using
lighthouse-ci
CLI command.
Synopsis
This package will help you to measure and audit the quality of your frontend HTML templates. It will start a web-server automatically on the given document root path, scan all HTML files and analyse them one by one. You can also run this tool in your CI pipeline.
Table of contents
Compatibility
This package only supports PHP version 7.1
or higher.
Requirements
This package is dependent to the lighthouse-ci package and Chrome
/Chromium
web browser, so you need to install them first.
You can install lighthouse-ci
easily, using this command:
$ npm install -g lighthouse-ci
Setup
Install the package globally using Composer :
$ composer global require suitmedia/frontend-lighthouse-audit
CLI Usage
$ lighthouse-audit -h Usage: lighthouse-audit [options] [--] <path> Arguments: path Specify the path of a directory to analyse. Options: -S, --server[=SERVER] Define the address and port that PHP web-server should serve. <address>:<port> [default: "localhost:8000"] --mode[=MODE] Define the mode to run Lighthouse audit. Option: mobile,desktop [default: "mobile"] --performance[=PERFORMANCE] Define the minimal performance score for audit to pass [default: "80"] --best-practices[=BEST-PRACTICES] Define the minimal best-practices score for audit to pass [default: "80"] --accessibility[=ACCESSIBILITY] Define the minimal accessibility score for audit to pass [default: "80"] --seo[=SEO] Define the minimal seo score for audit to pass [default: "80"] --pwa[=PWA] Define the minimal pwa score for audit to pass [default: "0"] --except[=EXCEPT] Provide a list of filenames that you wish to exclude, separated by commas. --chrome-flags[=CHROME-FLAGS] Custom flags to pass to Chrome (space-delimited). For a full list of flags, see http://peter.sh/experiments/chromium-command-line-switches/. -h, --help Display this help message -V, --version Display this application version
License
The MIT License (MIT). Please see License File for more information.