lighthouse

v9.5.0-dev.20220722
Automated auditing, performance metrics, and best practices for the web.
google chrome devtools

c8

bash lighthouse-core/scripts/c8.sh

fast

node ./lighthouse-cli/index.js --preset=desktop --throttlingMethod=provided

lint

[ "$CI" = true ] && eslint --quiet -f codeframe . || eslint .

test

yarn diff:sample-json && yarn lint --quiet && yarn unit && yarn type-check

unit

yarn unit-flow && yarn mocha

clean

rm -r dist proto/scripts/*.json proto/scripts/*_pb2.* proto/scripts/*_pb.* proto/scripts/__pycache__ proto/scripts/*.pyc *.report.html *.report.dom.html *.report.json *.devtoolslog.json *.trace.json shared/localization/locales/*.ctc.json || true

debug

node --inspect-brk ./lighthouse-cli/index.js

mocha

node --loader=testdouble lighthouse-core/test/scripts/run-mocha-tests.js

smoke

node lighthouse-cli/test/smokehouse/frontends/smokehouse-bin.js

start

yarn build-report --standalone && node ./lighthouse-cli/index.js

watch

yarn unit-core --watch

chrome

node lighthouse-core/scripts/manual-chrome-launcher.js

prepack

yarn build-report --standalone --flow --esm

unit:ci

NODE_OPTIONS=--max-old-space-size=8192 npm run unit --forbid-only

build-lr

yarn reset-link && node ./build/build-lightrider-bundles.js

cli-unit

yarn unit-cli

coverage

yarn unit:cicoverage && c8 report --reporter html

devtools

bash lighthouse-core/scripts/roll-to-devtools.sh

unit-cli

yarn mocha --testMatch lighthouse-cli/**/*-test.js

build-all

npm-run-posix-or-windows build-all:task

changelog

conventional-changelog --config ./build/changelog-generator/index.cjs --infile changelog.md --same-file

core-unit

yarn unit-core

test-docs

yarn --cwd docs/recipes/ test

unit-core

yarn mocha lighthouse-core

unit-flow

bash flow-report/test/run-flow-report-tests.sh

build-pack

bash build/build-pack.sh

reset-link

(yarn unlink || true) && yarn link && yarn link lighthouse

serve-dist

cd dist && python3 -m http.server

test-proto

yarn compile-proto && yarn build-proto-roundtrip

type-check

tsc --build ./tsconfig-all.json

flow-report

yarn build-report --flow && node ./lighthouse-core/scripts/build-test-flow-report.js

i18n:checks

./lighthouse-core/scripts/i18n/assert-strings-collected.sh

test-bundle

yarn smoke --runner bundle --retries=2

test-viewer

yarn unit-viewer && yarn mocha --testMatch viewer/**/*-test-pptr.js --timeout 35000

unit-report

yarn mocha --testMatch report/**/*-test.js

unit-viewer

yarn mocha --testMatch viewer/**/*-test.js

viewer-unit

yarn unit-viewer

build-report

node build/build-report-components.js && bash lighthouse-core/scripts/copy-util-commonjs.sh && node build/build-report.js

build-viewer

node ./build/build-viewer.js

dogfood-lhci

./lighthouse-core/scripts/dogfood-lhci.sh

run-devtools

node lighthouse-core/scripts/pptr-run-devtools.js

serve-viewer

yarn serve-gh-pages

test-clients

yarn mocha --testMatch clients/**/*-test.js && yarn mocha --testMatch clients/**/*-test-pptr.js

test-lantern

bash lighthouse-core/scripts/test-lantern.sh

test-treemap

yarn unit-treemap && yarn mocha --testMatch treemap/**/*-test-pptr.js --timeout 35000

timing-trace

node lighthouse-core/scripts/generate-timing-trace.js

unit-treemap

yarn mocha --testMatch treemap/**/*-test.js

vercel-build

yarn build-sample-reports && yarn build-viewer && yarn build-treemap

build-cdt-lib

node ./build/build-cdt-lib.js

build-treemap

node ./build/build-treemap.js

compile-proto

protoc --python_out=./ ./proto/lighthouse-result.proto && mv ./proto/*_pb2.py ./proto/scripts || (echo "❌ Install protobuf ≥ 3.7.1 to compile the proto file." && false)

deploy-viewer

yarn build-viewer --deploy

open-devtools

bash lighthouse-core/scripts/open-devtools.sh

serve-treemap

yarn serve-gh-pages

static-server

node lighthouse-cli/test/fixtures/static-server.js

test-devtools

bash lighthouse-core/test/devtools-tests/test-locally.sh

build-all:task

yarn build-report && yarn build-cdt-lib && yarn build-devtools && concurrently 'yarn build-extension' 'yarn build-lr' 'yarn build-viewer' 'yarn build-treemap' 'yarn build-smokehouse-bundle' && yarn build-pack

build-devtools

yarn reset-link && node ./build/build-bundle.js clients/devtools/devtools-entry.js dist/lighthouse-dt-bundle.js && node ./build/build-dt-report-resources.js

coverage:smoke

yarn c8 yarn smoke -j=1 && c8 report --reporter html

deploy-treemap

yarn build-treemap --deploy

serve-gh-pages

cd dist/gh-pages && python3 -m http.server

build-extension

yarn build-extension-chrome && yarn build-extension-firefox

save-latest-run

./lighthouse-core/scripts/save-latest-run.sh

unit:cicoverage

yarn c8 --all yarn unit:ci

diff:sample-json

yarn i18n:checks && bash lighthouse-core/scripts/assert-golden-lhr-unchanged.sh

minify-latest-run

./lighthouse-core/scripts/lantern/minify-trace.js ./latest-run/defaultPass.trace.json ./latest-run/defaultPass.trace.min.json && ./lighthouse-core/scripts/lantern/minify-devtoolslog.js ./latest-run/defaultPass.devtoolslog.json ./latest-run/defaultPass.devtoolslog.min.json

update:sample-json

yarn i18n:collect-strings && node ./lighthouse-cli -A=./lighthouse-core/test/results/artifacts --config-path=./lighthouse-core/test/results/sample-config.js --output=json --output-path=./lighthouse-core/test/results/sample_v2.json && node lighthouse-core/scripts/cleanup-LHR-for-diff.js ./lighthouse-core/test/results/sample_v2.json --only-remove-timing && node ./lighthouse-core/scripts/update-flow-fixtures.js

build-sample-reports

yarn build-report && node build/build-sample-reports.js

i18n:collect-strings

node lighthouse-core/scripts/i18n/collect-strings.js

build-proto-roundtrip

mkdir -p .tmp && cross-env PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION_VERSION=2 python proto/scripts/json_roundtrip_via_proto.py

computeBenchmarkIndex

./lighthouse-core/scripts/benchmark.js

diff:flow-sample-json

yarn i18n:collect-strings && bash lighthouse-core/scripts/assert-baseline-flow-result-unchanged.sh

build-all:task:windows

yarn build-report && yarn build-cdt-lib && yarn build-extension && yarn build-devtools && yarn build-lr && yarn build-viewer && yarn build-treemap && yarn build-smokehouse-bundle

build-extension-chrome

node ./build/build-extension.js chrome

test-legacy-javascript

bash lighthouse-core/scripts/test-legacy-javascript.sh

build-extension-firefox

node ./build/build-extension.js firefox

build-smokehouse-bundle

node ./build/build-smokehouse-bundle.js

update:flow-sample-json

yarn i18n:collect-strings && node ./lighthouse-core/scripts/update-flow-fixtures.js

update:lantern-baseline

node lighthouse-core/scripts/lantern/update-baseline-lantern-values.js

update:sample-artifacts

node lighthouse-core/scripts/update-report-fixtures.js

Metadata

  • Apache-2.0
  • >=14.15
  • The Lighthouse Authors
  • released 7/23/2022

Downloads