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/' })
just-launch comes with support for those browsers:
On those operating systems:
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)
})
$ npm install [-g] just-launch
Possible browser values:
chromefirefoxelectronphantomsafari (mac OS only)edge (Windows only)Options:
uriReturns a Browser object:
An error occurred.
The process exited.
Kill the browser process.
$ just-launch
Usage: just-launch BROWSER URI
MIT