-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
Prep export of launcher as a standalone module #2358
Conversation
So there's good news and bad news. 👍 The good news is that everyone that needs to sign a CLA (the pull request submitter and all commit authors) have done so. Everything is all good there. 😕 The bad news is that it appears that one or more commits were authored by someone other than the pull request submitter. We need to confirm that they're okay with their commits being contributed to this project. Please have them confirm that here in the pull request. Note to project maintainer: This is a terminal state, meaning the |
chrome-launcher/package.json
Outdated
"@types/node": "6.0.66", | ||
"lighthouse": "^2.0.0" | ||
}, | ||
"version": "0.0.1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
buggy version lol
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's start with a 0.1.0 at very least.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
chrome-launcher/.npmignore
Outdated
node_modules/ | ||
|
||
# include all compiled JS | ||
!*.js |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what rule is this negating? forcing the inclusion of tests or something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the ignore files won't be merged though, is the parent folder ignore creeping in?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
chrome-launcher/.npmignore
Outdated
|
||
# dev files | ||
.appveyor.yml | ||
.DS_Store |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: unnecessary (along with npm-debug.log and node_modules)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're gonna need a readme for this to be really real. :)
chrome-launcher/package.json
Outdated
"@types/node": "6.0.66", | ||
"lighthouse": "^2.0.0" | ||
}, | ||
"version": "0.0.1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's start with a 0.1.0 at very least.
@samccone do you need some help with readme? I'm not so good at writing docs but I can try to help. |
5a53ddb
to
d53b8e8
Compare
readme added, and comments addressed PTAL. |
The failed test looks weird, is the CI environment running performance tests to validate the build? |
chrome-launcher/README.md
Outdated
Launch chrome with ease from node. | ||
|
||
``` | ||
npm install chrome-launcher |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yarn add chrome-launcher
# npm install chrome-launcher
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
chrome-launcher/README.md
Outdated
chromeLauncher.launch({ | ||
// optional staring url string | ||
startingUrl: string; | ||
// optional array of (string) flags to pass to chrome |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mention these need --
or link to http://peter.sh/experiments/chromium-command-line-switches/
chrome-launcher/README.md
Outdated
startingUrl: string; | ||
// optional array of (string) flags to pass to chrome | ||
chromeFlags: Array<string>; | ||
// optional explicit remote debugging port number to use. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By default, a free port is selected for you.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
chrome-launcher/README.md
Outdated
#### Launching chrome: | ||
|
||
```js | ||
const chromeLauncher = require('chrome-launcher') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
chrome-launcher/README.md
Outdated
#### Launching headless chrome: | ||
|
||
```js | ||
const chromeLauncher = require('chrome-launcher') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
chrome-launcher/README.md
Outdated
|
||
chromeLauncher.launch({ | ||
startingUrl: 'https://google.com', | ||
chromeFlags: ['--headless'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
chromeFlags: ['--headless', '--disable-gpu']
for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
chrome-launcher/package.json
Outdated
"@types/node": "6.0.66" | ||
} | ||
"@types/node": "6.0.66", | ||
"lighthouse": "^2.0.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2.1.0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Also fixes #2469. @samccone Can you also mention the publishing workflow in https://github.com/GoogleChrome/lighthouse/blob/master/CONTRIBUTING.md? |
@ebidel noted how to release it in the doc. |
CONTRIBUTING.md
Outdated
|
||
```sh | ||
cd chrome-launcher | ||
echo "edit package.json bumping the version" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
npm version major|minor|patch
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Just the last suggestion.
@ebidel will be nice to update https://developers.google.com/web/updates/2017/04/headless-chrome after publishing this module ;) |
It was updated a few days ago to use the new chrome launcher. When the module is ready, we can switch over to showing install commands for that. |
CONTRIBUTING.md
Outdated
```sh | ||
cd chrome-launcher | ||
echo "edit package.json bumping the version (major|minor|patch)" | ||
echo "commit the change as a version bump" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how about suggesting npm version (major|minor|patch)
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
already updated :)
chrome-launcher/.npmignore
Outdated
|
||
# dev files | ||
.appveyor.yml | ||
.DS_Store |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it?
chrome-launcher/.npmignore
Outdated
node_modules/ | ||
|
||
# include all compiled JS | ||
!*.js |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the ignore files won't be merged though, is the parent folder ignore creeping in?
CONTRIBUTING.md
Outdated
echo "build the launcher source code" | ||
yarn build | ||
echo "run npm version [<newversion> | major | minor | patch | premajor | preminor | prepatch | prerelease | from-git]" | ||
echo "commit the change as a version bump" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i prefer versioning with yarn because it's interactive, but w/e. also in both cases the commit (and tag) is made automatically.
yarn version
echo "version bump will be committed"
…se#2358) * prep to publish to npm * Use logger from lighthouse. * Add launcher README * Add notes for releasing chrome launcher * Launcher readme tweaks * docs (contributing): launcher rls tweak
For now depend on lighthouse to use the logger. Eventually I vote that we pull out logger into a standalone module to consume to in both lighthouse and in launcher.
Fixes #2251
Fixes #2469.
Ref #2092