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
docs(api.md): expand on puppeteer-core vs puppeteer #3189
Conversation
docs/api.md
Outdated
- `puppeteer-core` doesn't automatically download Chromium when installed. | ||
- `puppeteer-core` ignores all `PUPPETEER_*` env variables. | ||
|
||
In most cases, you'll be fine using the `puppeteer` package right away. |
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.
remove "right away"
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.
docs/api.md
Outdated
`puppeteer` is a *product* for browser automation. When installed, it downloads a version of | ||
Chromium, which it then drives using `puppeteer-core`. Being an end-user product, `puppeteer` supports a bunch of convenient `PUPPETEER_*` env variables to tweak its behavior. | ||
|
||
`puppetee-core` is a *library* to help drive anything that supports devtools protocol. `puppeteer-core` doesn't download Chromium when installed. Being a library, `puppeteer-core` is fully driven |
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.
devtools => DevTools
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.
docs/api.md
Outdated
In most cases, you'll be fine using the `puppeteer` package right away. | ||
|
||
However, you should use `puppeteer-core` if: | ||
- you're building another end-user product or library atop of DevTools protocol. For example, one might build PDF generator using `puppeteer-core` and write a custom `install.js` script that downloads [`headless_shell`](https://chromium.googlesource.com/chromium/src/+/lkgr/headless/README.md) instead of Chromium to save up space. |
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.
save up space -> save disk space.
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.
docs/api.md
Outdated
|
||
However, you should use `puppeteer-core` if: | ||
- you're building another end-user product or library atop of DevTools protocol. For example, one might build PDF generator using `puppeteer-core` and write a custom `install.js` script that downloads [`headless_shell`](https://chromium.googlesource.com/chromium/src/+/lkgr/headless/README.md) instead of Chromium to save up space. | ||
- you're bundling puppeteer to use in Chrome Extension / Browser context. `puppeteer-core` contains all the code necessary to work with DevTools protocol and doesn't download unnecessary binary. |
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.
puppeteer -> Puppeteer
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.
docs/api.md
Outdated
|
||
However, you should use `puppeteer-core` if: | ||
- you're building another end-user product or library atop of DevTools protocol. For example, one might build PDF generator using `puppeteer-core` and write a custom `install.js` script that downloads [`headless_shell`](https://chromium.googlesource.com/chromium/src/+/lkgr/headless/README.md) instead of Chromium to save up space. | ||
- you're bundling puppeteer to use in Chrome Extension / Browser context. `puppeteer-core` contains all the code necessary to work with DevTools protocol and doesn't download unnecessary binary. |
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.
with the DevTools protocol where downloading an additional Chromium binary is unnecessary.
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.
92024fc
to
d3cb03f
Compare
No description provided.