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

Prep export of launcher as a standalone module #2358

Merged
merged 6 commits into from
Jun 13, 2017
Merged

Conversation

samccone
Copy link
Contributor

@samccone samccone commented May 25, 2017

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

@googlebot
Copy link

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 cla/google commit status will not change from this state. It's up to you to confirm consent of the commit author(s) and merge this pull request when appropriate.

@samccone samccone requested a review from paulirish May 25, 2017 03:14
"@types/node": "6.0.66",
"lighthouse": "^2.0.0"
},
"version": "0.0.1",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

buggy version lol :trollface:

Copy link
Member

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

node_modules/

# include all compiled JS
!*.js
Copy link
Collaborator

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done


# dev files
.appveyor.yml
.DS_Store
Copy link
Collaborator

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)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Copy link
Member

@paulirish paulirish left a 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. :)

"@types/node": "6.0.66",
"lighthouse": "^2.0.0"
},
"version": "0.0.1",
Copy link
Member

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.

@denar90
Copy link
Contributor

denar90 commented May 28, 2017

@samccone do you need some help with readme? I'm not so good at writing docs but I can try to help.

@samccone samccone force-pushed the prep-export branch 5 times, most recently from 5a53ddb to d53b8e8 Compare June 10, 2017 15:44
@samccone
Copy link
Contributor Author

readme added, and comments addressed PTAL.

@pedro93
Copy link

pedro93 commented Jun 10, 2017

The failed test looks weird, is the CI environment running performance tests to validate the build?

Launch chrome with ease from node.

```
npm install chrome-launcher
Copy link
Contributor

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 

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

chromeLauncher.launch({
// optional staring url string
startingUrl: string;
// optional array of (string) flags to pass to chrome
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

startingUrl: string;
// optional array of (string) flags to pass to chrome
chromeFlags: Array<string>;
// optional explicit remote debugging port number to use.
Copy link
Contributor

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

#### Launching chrome:

```js
const chromeLauncher = require('chrome-launcher')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

;

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

#### Launching headless chrome:

```js
const chromeLauncher = require('chrome-launcher')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

;

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done


chromeLauncher.launch({
startingUrl: 'https://google.com',
chromeFlags: ['--headless']
Copy link
Contributor

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

"@types/node": "6.0.66"
}
"@types/node": "6.0.66",
"lighthouse": "^2.0.0"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2.1.0

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@ebidel
Copy link
Contributor

ebidel commented Jun 10, 2017

Also fixes #2469.

@samccone Can you also mention the publishing workflow in https://github.com/GoogleChrome/lighthouse/blob/master/CONTRIBUTING.md?

@samccone
Copy link
Contributor Author

@ebidel noted how to release it in the doc.

CONTRIBUTING.md Outdated

```sh
cd chrome-launcher
echo "edit package.json bumping the version"
Copy link
Contributor

@ebidel ebidel Jun 10, 2017

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Copy link
Contributor

@ebidel ebidel left a 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.

@denar90
Copy link
Contributor

denar90 commented Jun 10, 2017

@ebidel will be nice to update https://developers.google.com/web/updates/2017/04/headless-chrome after publishing this module ;)

@ebidel
Copy link
Contributor

ebidel commented Jun 10, 2017

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"
Copy link
Collaborator

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)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

already updated :)


# dev files
.appveyor.yml
.DS_Store
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it?

node_modules/

# include all compiled JS
!*.js
Copy link
Collaborator

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"
Copy link
Member

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"

@paulirish paulirish merged commit 224c6a0 into master Jun 13, 2017
@paulirish paulirish deleted the prep-export branch June 13, 2017 17:23
paulirish pushed a commit to GoogleChrome/chrome-launcher that referenced this pull request Aug 29, 2017
…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants