npm stats
  • Search
  • About
  • Repo
  • Sponsor
  • more
    • Search
    • About
    • Repo
    • Sponsor

Made by Antonio Ramirez

just-launch

3.0.1

@juliangruber

npmHomeRepoSnykSocket
Downloads:0
$ npm install just-launch
DailyWeeklyMonthlyYearly

just-launch

Launch any browser, on any OS, with a fresh session!

$ just-launch chrome https://github.com/
const browser = await launch('chrome', { uri: 'https://github.com/' })

Browsers

just-launch comes with support for those browsers:

  • Chrome
  • Firefox
  • Safari
  • Edge
  • Electron
  • PhantomJS

On those operating systems:

  • mac OS
  • Windows
  • Linux

Usage

Use its CLI:

$ just-launch chrome https://github.com

Use its API:

const launch = require('just-launch')

// using async/await
const browser = await launch('chrome', { uri: 'https://github.com' })
browser.on('error', console.error)

// using promises
launch('chrome', { uri: 'https://github.com' })
.then(browser => {
  browser.on('error', console.error)
})

Installation

$ npm install [-g] just-launch

API

launch(browser, opts)

Possible browser values:

  • chrome
  • firefox
  • electron
  • phantom
  • safari (mac OS only)
  • edge (Windows only)

Options:

  • uri

Returns a Browser object:

Browser#on('error', cb)

An error occurred.

Browser#on('exit', cb)

The process exited.

Browser#kill()

Kill the browser process.

CLI

$ just-launch
Usage: just-launch BROWSER URI

Related projects

  • osx chrome
  • osx firefox
  • osx safari
  • linux chrome
  • linux firefox
  • windows chrome
  • windows firefox
  • windows edge
  • electron-stream
  • phantomjs-stream

License

MIT