Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

misc: rename lighthouse-cli to cli #13302

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
**/third_party/**
**/source-maps/**

lighthouse-cli/test/fixtures/byte-efficiency/bundle.js
cli/test/fixtures/byte-efficiency/bundle.js

/dist/**

Expand Down
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ module.exports = {
},
overrides: [
{
files: ['lighthouse-cli/test/smokehouse/**/*expectations.js'],
files: ['cli/test/smokehouse/**/*expectations.js'],
rules: {
'max-len': 0,
},
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ lcov.info
.nyc_output
*.lcov

lighthouse-cli/results
cli/results
results.html
last-run-results.html

Expand Down
8 changes: 4 additions & 4 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ lighthouse-core/third_party/src/
viewer/
treemap/
clients/
lighthouse-cli/results/
cli/results/
lighthouse-logger/

# keep a few scripts useful for CI
Expand All @@ -25,9 +25,9 @@ lighthouse-logger/

# Exclude the CLI smoketests but keep the smoketest runner that is used
# by downstream projects (e.g. publisher ads).
lighthouse-cli/test/*
!lighthouse-cli/test/smokehouse/
lighthouse-cli/test/smokehouse/test-definitions/
cli/test/*
!cli/test/smokehouse/
cli/test/smokehouse/test-definitions/

results/
lantern-data/
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ A PR for a new audit or changing an existing audit almost always needs the follo

1. **Unit tests**: in the matching test file (e.g. tests for `lighthouse-core/audits/my-swell-audit.js` go in `lighthouse-core/test/audits/my-swell-audit-test.js`).

1. **Smoke (end-to-end) tests**: search through the [existing test expectations](lighthouse-cli/test/smokehouse/test-definitions/) to see if there's a logical place to add a check for your change, or (as a last resort) add a new smoke test.
1. **Smoke (end-to-end) tests**: search through the [existing test expectations](cli/test/smokehouse/test-definitions/) to see if there's a logical place to add a check for your change, or (as a last resort) add a new smoke test.

1. Run `yarn update:sample-json` to update the [sample Lighthouse result JSON](lighthouse-core/test/results/sample_v2.json) kept in the repo for testing. This will also pull any strings needed for localization into the correct files.

Expand Down Expand Up @@ -74,7 +74,7 @@ A PR adding or changing a gatherer almost always needs to include the following:

As a result, we mostly rely on smoke testing for gatherers. However, if there are parts of a gatherer that naturally lend themselves to unit testing, the new tests would go in the matching test file (e.g. tests for `lighthouse-core/gather/gatherers/reap.js` go in `lighthouse-core/test/gather/gatherers/reap-test.js`).

1. **Smoke (end-to-end) tests**: search through the [existing test expectations](lighthouse-cli/test/smokehouse/test-definitions/) to see if there's a logical place to add a check for your change, or (as a last resort) add a new smoke test if one is required.
1. **Smoke (end-to-end) tests**: search through the [existing test expectations](cli/test/smokehouse/test-definitions/) to see if there's a logical place to add a check for your change, or (as a last resort) add a new smoke test if one is required.

It's most important to get true end-to-end coverage, so be sure that audits that consume the new gatherer output are in the expectations. Artifacts can also have expectations for those intermediate results.

Expand Down
2 changes: 1 addition & 1 deletion build/build-lightrider-bundles.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ function buildReportGenerator() {

async function buildStaticServerBundle() {
const bundle = await rollup.rollup({
input: 'lighthouse-cli/test/fixtures/static-server.js',
input: 'cli/test/fixtures/static-server.js',
plugins: [
rollupPlugins.shim({
'es-main': 'export default function() { return false; }',
Expand Down
4 changes: 2 additions & 2 deletions build/build-smokehouse-bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ const {LH_ROOT} = require('../root.js');

const distDir = `${LH_ROOT}/dist`;
const bundleOutFile = `${distDir}/smokehouse-bundle.js`;
const smokehouseLibFilename = './lighthouse-cli/test/smokehouse/frontends/lib.js';
const smokehouseCliFilename = `${LH_ROOT}/lighthouse-cli/test/smokehouse/lighthouse-runners/cli.js`;
const smokehouseLibFilename = './cli/test/smokehouse/frontends/lib.js';
const smokehouseCliFilename = `${LH_ROOT}/cli/test/smokehouse/lighthouse-runners/cli.js`;

async function build() {
const bundle = await rollup.rollup({
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ describe('CLI bin', function() {

it('should load the config from the path (es modules)', async () => {
const configPath =
`${LH_ROOT}/lighthouse-cli/test/smokehouse/test-definitions/a11y/a11y-config.js`;
`${LH_ROOT}/cli/test/smokehouse/test-definitions/a11y/a11y-config.js`;
cliFlags = {...cliFlags, configPath: configPath};
const actualConfig = (await import(configPath)).default;
await bin.begin();
Expand Down Expand Up @@ -181,7 +181,7 @@ describe('CLI bin', function() {

describe('precomputedLanternData', () => {
it('should read lantern data from file', async () => {
const lanternDataFile = `${LH_ROOT}/lighthouse-cli/test/fixtures/lantern-data.json`;
const lanternDataFile = `${LH_ROOT}/cli/test/fixtures/lantern-data.json`;
cliFlags = {...cliFlags, precomputedLanternDataPath: lanternDataFile};
await bin.begin();

Expand All @@ -192,7 +192,7 @@ describe('CLI bin', function() {
});

it('should throw when invalid lantern data used', async () => {
const headersFile = `${LH_ROOT}/lighthouse-cli/test/fixtures/extra-headers/valid.json`;
const headersFile = `${LH_ROOT}/cli/test/fixtures/extra-headers/valid.json`;
cliFlags = {...cliFlags, precomputedLanternDataPath: headersFile};
await expect(bin.begin()).rejects.toBeTruthy();
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ describe('CLI flags', function() {
it('settings are accepted from a file path', () => {
const flags = getFlags([
'http://www.example.com',
`--cli-flags-path="${LH_ROOT}/lighthouse-cli/test/fixtures/cli-flags-path.json"`,
`--cli-flags-path="${LH_ROOT}/cli/test/fixtures/cli-flags-path.json"`,
'--budgets-path=path/to/my/budget-from-command-line.json', // this should override the config value
].join(' '));

Expand Down Expand Up @@ -90,7 +90,7 @@ describe('CLI flags', function() {
});

it('should read extra headers from file', () => {
const headersFile = `${LH_ROOT}/lighthouse-cli/test/fixtures/extra-headers/valid.json`;
const headersFile = `${LH_ROOT}/cli/test/fixtures/extra-headers/valid.json`;
const headers = JSON.parse(fs.readFileSync(headersFile, 'utf-8'));
const flags = getFlags([
'http://www.example.com',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {spawnSync} from 'child_process';

import {LH_ROOT} from '../../../root.js';

const indexPath = `${LH_ROOT}/lighthouse-cli/index.js`;
const indexPath = `${LH_ROOT}/cli/index.js`;

describe('CLI Tests', function() {
it('fails if a url is not provided', () => {
Expand Down Expand Up @@ -69,7 +69,7 @@ describe('CLI Tests', function() {
it('should exit with a error if the file does not contain valid JSON', () => {
const ret = spawnSync('node', [indexPath, 'https://www.google.com',
'--extra-headers',
`${LH_ROOT}/lighthouse-cli/test/fixtures/extra-headers/invalid.txt`], {encoding: 'utf8'});
`${LH_ROOT}/cli/test/fixtures/extra-headers/invalid.txt`], {encoding: 'utf8'});

assert.ok(ret.stderr.includes('Unexpected token'));
assert.equal(ret.status, 1);
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import {LH_ROOT} from '../../../root.js';
const HEADER_SAFELIST = new Set(['x-robots-tag', 'link', 'content-security-policy']);

class Server {
baseDir = `${LH_ROOT}/lighthouse-cli/test/fixtures`;
baseDir = `${LH_ROOT}/cli/test/fixtures`;

constructor() {
this._server = http.createServer(this._requestHandler.bind(this));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import {updateTestDefnFormat} from './back-compat-util.js';
import {LH_ROOT} from '../../../../root.js';

const coreTestDefnsPath =
path.join(LH_ROOT, 'lighthouse-cli/test/smokehouse/test-definitions/core-tests.js');
path.join(LH_ROOT, 'cli/test/smokehouse/test-definitions/core-tests.js');

/**
* Possible Lighthouse runners. Loaded dynamically so e.g. a CLI run isn't
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ async function internalRun(url, tmpPath, configJson, options) {
const artifactsDirectory = `${tmpPath}/artifacts/`;

const args = [
`${LH_ROOT}/lighthouse-cli/index.js`,
`${LH_ROOT}/cli/index.js`,
`${url}`,
`--output-path=${outputPath}`,
'--output=json',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ By default this is done using the Lighthouse CLI (to exercise the full pipeline)

## Options

See [`SmokehouseOptions`](https://github.com/GoogleChrome/lighthouse/blob/master/lighthouse-cli/test/smokehouse/smokehouse.js#L23).
See [`SmokehouseOptions`](https://github.com/GoogleChrome/lighthouse/blob/master/cli/test/smokehouse/smokehouse.js#L23).

## Test definitions

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import fs from 'fs';
import {LH_ROOT} from '../../../../../root.js';

const mapJson =
fs.readFileSync(`${LH_ROOT}/lighthouse-cli/test/fixtures/source-map/script.js.map`, 'utf-8');
fs.readFileSync(`${LH_ROOT}/cli/test/fixtures/source-map/script.js.map`, 'utf-8');
const map = JSON.parse(mapJson);

/**
Expand Down
2 changes: 1 addition & 1 deletion docs/hacking-tips.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Getting errors like these?
Use [`--trace-warnings`](https://medium.com/@jasnell/introducing-process-warnings-in-node-v6-3096700537ee) to get actual stack traces.

```sh
node --trace-warnings lighthouse-cli http://example.com
node --trace-warnings cli http://example.com
```

## Iterating on the report
Expand Down
2 changes: 1 addition & 1 deletion docs/variability.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ If you're running Lighthouse directly via node, you can use the `computeMedianRu

```js
const spawnSync = require('child_process').spawnSync;
const lighthouseCli = require.resolve('lighthouse/lighthouse-cli');
const lighthouseCli = require.resolve('lighthouse/cli');
const {computeMedianRun} = require('lighthouse/lighthouse-core/lib/median-run.js');

const results = [];
Expand Down
2 changes: 1 addition & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module.exports = {
testEnvironment: 'node',
testMatch: [
'**/lighthouse-core/**/*-test.js',
'**/lighthouse-cli/**/*-test.js',
'**/cli/**/*-test.js',
'**/report/**/*-test.js',
'**/lighthouse-core/test/fraggle-rock/**/*-test-pptr.js',
'**/treemap/**/*-test.js',
Expand Down
2 changes: 1 addition & 1 deletion lighthouse-core/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const Config = require('./config/config.js');
* runner.js - marshalls the actions that must be taken (Gather / Audit)
* config file is used to determine which of these actions are needed
*
* lighthouse-cli \
* cli \
* -- core/index.js ----> runner.js ----> [Gather / Audit]
* clients /
*/
Expand Down
2 changes: 1 addition & 1 deletion lighthouse-core/scripts/assert-golden-lhr-unchanged.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ trap teardown EXIT

colorText "Generating a fresh LHR..." "$purple"
set -x
node "$lhroot_path/lighthouse-cli" -A="$lh_tmp_artifacts_path" --config-path="$lhroot_path/lighthouse-core/test/results/sample-config.js" --quiet --output=json --output-path="$freshLHRPath"
node "$lhroot_path/cli" -A="$lh_tmp_artifacts_path" --config-path="$lhroot_path/lighthouse-core/test/results/sample-config.js" --quiet --output=json --output-path="$freshLHRPath"
set +x

# remove timing from both
Expand Down
2 changes: 1 addition & 1 deletion lighthouse-core/scripts/c8.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ set -euxo pipefail
echo $*

node node_modules/.bin/c8 \
--include '{lighthouse-core,lighthouse-cli,viewer,treemap,build/plugins,report,flow-report}' \
--include '{lighthouse-core,cli,viewer,treemap,build/plugins,report,flow-report}' \
--exclude third_party \
--exclude '**/test/' \
--exclude '**/scripts/' \
Expand Down
4 changes: 2 additions & 2 deletions lighthouse-core/scripts/compare-runs.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ async function gather() {
if (fs.existsSync(gatherDir)) continue;

await execFile('node', [
`${LH_ROOT}/lighthouse-cli`,
`${LH_ROOT}/cli`,
url,
`--gather-mode=${gatherDir}`,
argv.lhFlags,
Expand Down Expand Up @@ -197,7 +197,7 @@ async function audit() {

try {
const args = [
`${LH_ROOT}/lighthouse-cli`,
`${LH_ROOT}/cli`,
url,
`--audit-mode=${gatherDir}`,
`--output-path=${outputPath}`,
Expand Down
2 changes: 1 addition & 1 deletion lighthouse-core/scripts/lantern/collect/collect.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ async function startWptTest(url) {
async function runUnthrottledLocally(url) {
const artifactsFolder = `${LH_ROOT}/.tmp/collect-traces-artifacts`;
const {stdout} = await execFileAsync('node', [
`${LH_ROOT}/lighthouse-cli`,
`${LH_ROOT}/cli`,
url,
'--throttling-method=provided',
'--output=json',
Expand Down
2 changes: 1 addition & 1 deletion lighthouse-core/scripts/release/package-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ npm explore lighthouse -- npm run fast -- http://example.com

# Packaged smokehouse/lighthouse using root's static-server and test fixtures.
# This is because we don't have access to any of the dev dependencies.
CI="" yarn smokehouse --tests-path="$LH_ROOT/lighthouse-cli/test/smokehouse/test-definitions/core-tests.js" --retries=2
CI="" yarn smokehouse --tests-path="$LH_ROOT/cli/test/smokehouse/test-definitions/core-tests.js" --retries=2

cd "$LH_ROOT"
rm -rf /tmp/lighthouse-local-test
Expand Down
6 changes: 3 additions & 3 deletions lighthouse-core/scripts/update-report-fixtures.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@

import fs from 'fs';

import * as cli from '../../lighthouse-cli/run.js';
import * as cliFlags from '../../lighthouse-cli/cli-flags.js';
import * as cli from '../../cli/run.js';
import * as cliFlags from '../../cli/cli-flags.js';
import assetSaver from '../lib/asset-saver.js';
import {server} from '../../lighthouse-cli/test/fixtures/static-server.js';
import {server} from '../../cli/test/fixtures/static-server.js';
import budgetedConfig from '../test/results/sample-config.js';
import {LH_ROOT} from '../../root.js';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@

import {beforeAll, beforeEach, afterAll, afterEach} from '@jest/globals';
import puppeteer from 'puppeteer';
import {Server} from '../../../../lighthouse-cli/test/fixtures/static-server.js';
import {Server} from '../../../../cli/test/fixtures/static-server.js';

/** @typedef {InstanceType<typeof import('../../../../lighthouse-cli/test/fixtures/static-server.js').Server>} StaticServer */
/** @typedef {InstanceType<typeof import('../../../../cli/test/fixtures/static-server.js').Server>} StaticServer */

/**
* Some audits can be notApplicable based on machine timing information.
Expand Down
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
"description": "Automated auditing, performance metrics, and best practices for the web.",
"main": "./lighthouse-core/index.js",
"bin": {
"lighthouse": "./lighthouse-cli/index.js",
"lighthouse": "./cli/index.js",
"chrome-debug": "./lighthouse-core/scripts/manual-chrome-launcher.js",
"smokehouse": "./lighthouse-cli/test/smokehouse/frontends/smokehouse-bin.js"
"smokehouse": "./cli/test/smokehouse/frontends/smokehouse-bin.js"
},
"engines": {
"node": ">=14.15"
Expand All @@ -32,9 +32,9 @@
"c8": "bash lighthouse-core/scripts/c8.sh",
"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",
"lint": "[ \"$CI\" = true ] && eslint --quiet -f codeframe . || eslint .",
"smoke": "node lighthouse-cli/test/smokehouse/frontends/smokehouse-bin.js",
"debug": "node --inspect-brk ./lighthouse-cli/index.js",
"start": "yarn build-report --standalone && node ./lighthouse-cli/index.js",
"smoke": "node cli/test/smokehouse/frontends/smokehouse-bin.js",
"debug": "node --inspect-brk ./cli/index.js",
"start": "yarn build-report --standalone && node ./cli/index.js",
"jest": "node --experimental-vm-modules ./node_modules/jest/bin/jest.js",
"test": "yarn diff:sample-json && yarn lint --quiet && yarn unit && yarn type-check",
"test-bundle": "yarn smoke --runner bundle -j=1 --retries=2 --invert-match forms",
Expand All @@ -46,7 +46,7 @@
"test-docs": "yarn --cwd docs/recipes/ test",
"test-proto": "yarn compile-proto && yarn build-proto-roundtrip",
"unit-core": "yarn jest \"lighthouse-core\"",
"unit-cli": "yarn jest \"lighthouse-cli/\"",
"unit-cli": "yarn jest \"cli/\"",
"unit-report": "yarn jest \"report/\"",
"unit-treemap": "yarn jest \"treemap/.*-test.js\"",
"unit-viewer": "yarn jest \"viewer/.*-test.js\"",
Expand All @@ -62,7 +62,7 @@
"coverage:smoke": "yarn c8 yarn smoke -j=1 && c8 report --reporter html",
"devtools": "bash lighthouse-core/scripts/roll-to-devtools.sh",
"chrome": "node lighthouse-core/scripts/manual-chrome-launcher.js",
"fast": "node ./lighthouse-cli/index.js --preset=desktop --throttlingMethod=provided",
"fast": "node ./cli/index.js --preset=desktop --throttlingMethod=provided",
"deploy-treemap": "yarn build-treemap --deploy",
"deploy-viewer": "yarn build-viewer --deploy",
"vercel-build": "yarn build-sample-reports && yarn build-viewer && yarn build-treemap",
Expand All @@ -74,7 +74,7 @@
"i18n:collect-strings": "node lighthouse-core/scripts/i18n/collect-strings.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",
"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",
"update:sample-json": "yarn i18n:collect-strings && node ./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",
"update:flow-sample-json": "node ./lighthouse-core/scripts/update-flow-fixtures.js",
"update:test-devtools": "bash lighthouse-core/test/chromium-web-tests/test-locally.sh --reset-results",
"test-devtools": "bash lighthouse-core/test/chromium-web-tests/test-locally.sh",
Expand All @@ -86,7 +86,7 @@
"save-latest-run": "./lighthouse-core/scripts/save-latest-run.sh",
"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)",
"build-proto-roundtrip": "mkdir -p .tmp && cross-env PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION_VERSION=2 python proto/scripts/json_roundtrip_via_proto.py",
"static-server": "node lighthouse-cli/test/fixtures/static-server.js",
"static-server": "node cli/test/fixtures/static-server.js",
"serve-dist": "cd dist && python -m SimpleHTTPServer",
"serve-gh-pages": "cd dist/gh-pages && python -m SimpleHTTPServer",
"serve-treemap": "yarn serve-gh-pages",
Expand Down
6 changes: 3 additions & 3 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ By default, Lighthouse writes the report to an HTML file. You can control the ou
### CLI options

<!-- To update the help output:
node lighthouse-cli --help | pbcopy
node cli --help | pbcopy
-->

```
Expand Down Expand Up @@ -283,11 +283,11 @@ yarn build-all
### Run

```sh
node lighthouse-cli http://example.com
yarn start http://example.com
# append --chrome-flags="--no-sandbox --headless --disable-gpu" if you run into problems connecting to Chrome
```

> **Getting started tip**: `node --inspect-brk lighthouse-cli http://example.com` to open up Chrome DevTools and step
> **Getting started tip**: `node --inspect-brk cli http://example.com` to open up Chrome DevTools and step
through the entire app. See [Debugging Node.js with Chrome
DevTools](https://medium.com/@paul_irish/debugging-node-js-nightlies-with-chrome-devtools-7c4a1b95ae27#.59rma3ukm)
for more info.
Expand Down
Loading