@cityssm/puppeteer-launch
TypeScript icon, indicating that this package has built-in type declarations

2.1.0 • Public • Published

Puppeteer Launch

npm (scoped) DeepSource Maintainability codecov Coverage Testing

A helper for puppeteer.launch(), for when cached Puppeteer browsers aren't available or aren't compatible.

A drop-in replacement the falls back to system browsers automatically!

Installation

npm install @cityssm/puppeteer-launch

Usage

import puppeteerLaunch from '@cityssm/puppeteer-launch'

// Launch the default cached browser (likely Chrome).
// Will fallback to a system browser (either Chrome, Chromium, or Firefox)
// if no cached browser is available.
const browser = await puppeteerLaunch()

// Launch a Firefox web browser.
// Will use a system Firefox if no Firefox in the Puppeteer cache.
const firefoxBrowser = await puppeteerLaunch({
  product: 'firefox'
})

Package Sidebar

Install

npm i @cityssm/puppeteer-launch

Weekly Downloads

63

Version

2.1.0

License

MIT

Unpacked Size

17.5 kB

Total Files

9

Last publish

Collaborators

  • dgowans