Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

just-launch Build Status

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

License

MIT

About

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

Resources

Packages

No packages published