juliangruber / Just Launch
Launch any browser, on any OS, with a fresh session!
Stars: ✭ 90
Programming Languages
javascript
184084 projects - #8 most used programming language
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
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].