npm.io
7.2.0 • Published yesterdayCLI

@cityssm/puppeteer-launch

Licence
MIT
Version
7.2.0
Deps
6
Size
45 kB
Vulns
0
Weekly
0
Stars
1

Puppeteer Launch

npm (scoped) DeepSource 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({
  browser: 'firefox'
})

Keywords