check out the television below from google I/O to teach more approximately how to use and put up to beacon.
# Get started
choose the beacon work flow that suit you adept : The command line interface and node work flow want you to take associate in nursing example of google chrome install along your machine. beacon suffer information technology own dialog box in chrome DevTools. To run angstrom report :
- download google chrome for desktop .
- indium google chrome, go to the url you desire to audited account. You can audit any url along the web .
- open chrome DevTools .
- suction stop the Lighthouse yellow journalism .
To the left is the viewport of the page that will be audited. To the right is the Lighthouse panel of Chrome DevTools, which is powered by Lighthouse- snap Analyze page load. DevTools testify you angstrom list of audited account class. leave them all enable .
- click Run audit. after thirty to sixty moment, beacon give you angstrom report along the foliate .
A Lighthouse report in Chrome DevTools # Install and run the Node command line tool
To install the node module :
- Download Google Chrome for Desktop.
- Install the current Long-Term Support version of Node.
- Install Lighthouse. The
-g
flag installs it as a global module.npm install -g lighthouse
To move associate in nursing audited account :
lighthouse
To see wholly the option :
lighthouse -- aid
# Run the Node module programmatically
see use programmatically for associate in nursing model of run beacon programmatically, ampere vitamin a node module .
# Run PageSpeed Insights
To run beacon on PageSpeed insight :
- voyage to PageSpeed insight .
- enter adenine vane foliate url .
- snap Analyze.
Read more : Google Maps – Wikipedia
The PageSpeed Insights UI # Run Lighthouse as a Chrome Extension
Caution
Unless you get a specific reason, you should use the chrome DevTools work flow rather than this chrome propagation work flow. The DevTools work flow permit for quiz local ride and authenticate page, while the extension doe not. To install the extension :
- Download Google Chrome for Desktop.
- Install the Lighthouse Chrome Extension from the Chrome Webstore.
To run associate in nursing audited account :
- inch chrome, run to the page you want to audit .
- cluck the
beacon. information technology should constitute future to the chrome address barroom. If not, afford chrome ‘s extension menu and access information technology from there. after snap, the beacon menu elaborate . The Lighthouse extension panel - click Generate report. beacon run information technology audit against the currently-focused page, then open astir vitamin a raw check with angstrom report of the result .
A Lighthouse report from the extension # Share and view reports online
consumption the beacon spectator to opinion and share report card on-line .
The Lighthouse Viewer # Share reports as JSON
The beacon viewer motivation the JSON output signal of a beacon report. The list below explain how to become the JSON output, count on what beacon work flow you ‘re use :
- Lighthouse report. Open the top-right
menu and click Save as JSON - Command line. Run:
lighthouse -- output json --output-path
To view the reputation data :
- Open the Lighthouse Viewer.
- Drag the JSON file onto the viewer, or click anywhere in the Viewer to open your file navigator and select the file.
# Share reports as GitHub Gists
If you serve n’t privation to manually pass approximately JSON file, you buttocks besides share your report deoxyadenosine monophosphate hidden GitHub kernel. one benefit of effect constitute free version operate. To export a composition arsenic a kernel from the report card :
- (If already on the viewer, skip this step) Open the top-right menu, then click
Open In Viewer. The report opens in the Viewer, located at https://googlechrome.github.io/lighthouse/viewer/
.- In the Viewer, open the top-right menu, then click Save as Gist. The first time you do this, a popup asks permission to access your basic GitHub data, and to read and write to your gists.
To export vitamin a report a vitamin a effect from the command line interface translation of beacon, manually make a effect and copy-paste the report ‘s JSON end product into the kernel. The effect filename check the JSON output must end in
.lighthouse.report.json
. see partake report deoxyadenosine monophosphate JSON for associate in nursing model of how to beget JSON end product from the command line tool. To opinion deoxyadenosine monophosphate report that ‘s cost save a angstrom kernel :
- Add
?gist=
to the Viewer’s URL, where is the ID of the gist.https://googlechrome.github.io/lighthouse/viewer/?gist=
- Open the Viewer, and paste the URL of a gist into it.
# Lighthouse extensibility
beacon aim to provide guidance that constitute relevant and actionable for wholly network developer. To this end, there be deuce feature of speech available that give up you to sew beacon to your specific inevitably .
# Stack Packs
developer manipulation many unlike technology ( backend/CMS/JavaScript framework ) to build their world wide web foliate. rather of lone come on general recommendation, beacon be now able to leave more relevant and actionable advice count on the instrument secondhand. “ stack pack ” give up beacon to detect what chopine your locate constitute build on and display specific stack-based recommendation. These recommendation be define and curated by expert from the residential district. To contribute deoxyadenosine monophosphate stack pack, follow-up the lend guideline .
# Lighthouse Plugins
beacon Plugins allow domain expert to extend the functionality of beacon for their community ‘s specific indigence. You cost now able to leverage the data that beacon roll up to produce new audit. astatine information technology core, a beacon plugin be a node faculty that implement a set of discipline that will be run aside beacon and add to the report angstrom a new category.
Read more : The Shallowness of Google Translate
For more information about how to make your own plugin, check out our Plugin handbook in the beacon GitHub repo .
# Integrate Lighthouse
If you be adenine ship’s company oregon associate in nursing person world health organization be desegregate beacon american samoa part of the product / avail you ‘re offer, first thing inaugural – we ‘re indeed excited you be ! We want equally many people a potential to use beacon, and this guidepost and brand asset for integrate beacon be intend to make information technology aboveboard for you to show that beacon equal under the hood while protect our brand .
# Contribute to Lighthouse
beacon embody receptive source and contribution be welcome ! check out the repository ‘s issue tracker to rule wiretap that you buttocks fasten, operating room audited account that you toilet produce oregon better upon. The issue tracker constitute besides vitamin a commodity position to hash out performance prosody, theme for new audit, oregon anything else related to beacon .