suitmedia / frontend-lighthouse-audit
一个用于自动进行前端开发Lighthouse审计的PHP包。
0.2.0
2019-02-17 04:49 UTC
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-09-17 18:18:28 UTC
README
前端Lighthouse审计
一个简单的工具,使用
lighthouse-ci
CLI命令审计所有的前端HTML模板。
摘要
此包将帮助您衡量和审计您的前端HTML模板的质量。它将在给定的文档根路径上自动启动一个web服务器,扫描所有HTML文件并逐个分析它们。您还可以在您的CI管道中运行此工具。
目录
兼容性
此包仅支持PHP版本7.1
或更高。
需求
此包依赖于lighthouse-ci包和Chrome
/ Chromium
网络浏览器,因此您需要先安装它们。
您可以使用以下命令轻松安装lighthouse-ci
$ npm install -g lighthouse-ci
设置
使用Composer全局安装此包
$ composer global require suitmedia/frontend-lighthouse-audit
CLI使用
$ 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
许可证
MIT许可证(MIT)。有关更多信息,请参阅许可证文件