This commit is contained in:
Sam Saccone 2016-03-12 16:42:33 -08:00
Родитель ea0c8a26d4
Коммит 0c336f8546
3 изменённых файлов: 16 добавлений и 3 удалений

9
launch-chrome.sh Executable file
Просмотреть файл

@ -0,0 +1,9 @@
#!/usr/bin/env bash
/Applications/Google\ Chrome\ Canary.app/Contents/MacOS/Google\ Chrome\ Canary \
--remote-debugging-port=9222 \
--no-first-run \
--enable-gpu-benchmarking \
--user-data-dir="/tmp/lighthouse-profile" \
"about:blank"

Просмотреть файл

@ -9,7 +9,8 @@
"scripts": {
"lint": "eslint .",
"test": "npm run lint --silent && npm run unit",
"unit": "mocha test/*.js --timeout 60000"
"unit": "mocha test/*.js --timeout 60000",
"start": "node ."
},
"repository": {
"type": "git",

Просмотреть файл

@ -7,10 +7,11 @@ _status: very early. mostly not working_
Will run the audits defined in the `audits/` folder against a demo app. Chrome protocol connection maintained via [chrome-remote-interface](https://github.com/cyrus-and/chrome-remote-interface). Start Chrome manually; we can pursue [auto-launching](https://www.npmjs.com/package/chrome-launch) it later.
```sh
# Start Chrome with a few flags
/Applications/Google\ Chrome\ Canary.app/Contents/MacOS/Google\ Chrome\ Canary --remote-debugging-port=9222 --no-first-run --user-data-dir="/tmp/lighthouse-profile" --enable-gpu-benchmarking "about:blank"
./launch-chrome.sh
# Kick off a lighthouse run
node .
npm start
```
## Tests
@ -21,6 +22,8 @@ Some basic unit tests forked from node-big-rig are in `/test` and run via mocha.
npm test
```
The traceviewer-based trace processor from [node-big-rig](https://github.com/GoogleChrome/node-big-rig/tree/master/lib) was forked into Lighthouse. It's exposed by `lib/processor`. See an example use in the [time-in-javascript](https://github.com/GoogleChrome/lighthouse/blob/85933f07791982d556177fddb55f578d30a4b56f/audits/time-in-javascript/index.js#L43) audit
## Trace processing
The traceviewer-based trace processor from [node-big-rig](https://github.com/GoogleChrome/node-big-rig/tree/master/lib) was forked into Lighthouse. It's exposed by `lib/processor`. See an example use in the [time-in-javascript](https://github.com/GoogleChrome/lighthouse/blob/85933f07791982d556177fddb55f578d30a4b56f/audits/time-in-javascript/index.js#L43) audit