lighthouse

v8.0.0-dev.20210626
Automated auditing, performance metrics, and best practices for the web.
google chrome devtools

c8

bash lighthouse-core/scripts/c8.sh

fast

yarn start --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-core && yarn unit-cli && yarn unit-report && yarn unit-viewer && yarn unit-treemap

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 lighthouse-core/lib/i18n/locales/*.ctc.json || true

debug

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

smoke

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

start

node ./lighthouse-cli/index.js

watch

yarn unit-core --watch

chrome

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

unit:ci

NODE_OPTIONS=--max-old-space-size=8192 npm run unit-core -- --ci && npm run unit-cli -- --ci && npm run unit-report -- --ci && npm run unit-viewer -- --ci && npm run unit-treemap -- --ci

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

jest "lighthouse-cli/"

build-all

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

changelog

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

core-unit

yarn unit-core

now-build

node lighthouse-core/scripts/build-report-for-autodeployment.js && yarn build-viewer && yarn build-treemap && cp -r dist/gh-pages dist/now/gh-pages

test-docs

yarn --cwd docs/recipes/auth && jest docs/recipes/integration-test && yarn --cwd docs/recipes/custom-gatherer-puppeteer test

unit-core

jest "lighthouse-core"

build-pack

bash build/build-pack.sh

reset-link

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

serve-dist

cd dist && python -m SimpleHTTPServer

test-proto

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

type-check

tsc -p . && tsc -p lighthouse-viewer/ && tsc -p lighthouse-treemap/

i18n:checks

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

test-bundle

yarn smoke --runner bundle -j=1 --retries=2 --invert-match forms

test-viewer

yarn unit-viewer && jest lighthouse-viewer/test/viewer-test-pptr.js

unit-report

jest "report/"

unit-viewer

jest "lighthouse-viewer/.*-test.js"

viewer-unit

yarn unit-viewer

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

jest "clients/"

test-lantern

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

test-treemap

yarn unit-treemap && jest lighthouse-treemap/test/treemap-test-pptr.js

timing-trace

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

unit-treemap

jest "lighthouse-treemap/.*-test.js"

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/chromium-web-tests/test-locally.sh

build-all:task

yarn build-cdt-lib && yarn build-devtools && (yarn build-extension & yarn build-lr & yarn build-viewer & yarn build-treemap & yarn build-smokehouse-bundle & wait) && yarn build-pack

build-devtools

yarn reset-link && node ./build/build-bundle.js clients/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 && python -m SimpleHTTPServer

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

i18n:collect-strings

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

update:test-devtools

bash lighthouse-core/test/chromium-web-tests/test-locally.sh --reset-results

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

build-all:task:windows

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: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
  • >=12.13.0
  • The Lighthouse Authors
  • released 6/27/2021

Downloads