Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/juliangruber/just-launch
Launch any browser, on any OS, with a fresh session!
https://github.com/juliangruber/just-launch
Last synced: 12 days ago
JSON representation
Launch any browser, on any OS, with a fresh session!
- Host: GitHub
- URL: https://github.com/juliangruber/just-launch
- Owner: juliangruber
- Created: 2016-09-01T12:39:43.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-05-21T09:58:03.000Z (over 6 years ago)
- Last Synced: 2024-10-23T09:59:51.800Z (21 days ago)
- Language: JavaScript
- Homepage:
- Size: 30.3 KB
- Stars: 91
- Watchers: 4
- Forks: 6
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# just-launch [![Build Status](https://travis-ci.com/juliangruber/just-launch.svg?branch=master)](https://travis-ci.com/juliangruber/just-launch)
Launch any browser, on any OS, with a fresh session!
```bash
$ just-launch chrome https://github.com/
``````js
const browser = await launch('chrome', { uri: 'https://github.com/' })
```## Browsers
`just-launch` comes with support for those browsers:
- Chrome
- Firefox
- Safari
- Edge
- Electron
- PhantomJSOn those operating systems:
- mac OS
- Windows
- Linux## Usage
Use its CLI:
```bash
$ just-launch chrome https://github.com
```Use its API:
```js
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
```bash
$ 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
```bash
$ just-launch
Usage: just-launch BROWSER URI
```## Related projects
- [osx chrome](https://github.com/juliangruber/osx-chrome)
- [osx firefox](https://github.com/juliangruber/osx-firefox)
- [osx safari](https://github.com/juliangruber/osx-safari)
- [linux chrome](https://github.com/juliangruber/linux-chrome)
- [linux firefox](https://github.com/juliangruber/linux-firefox)
- [windows chrome](https://github.com/ashnur/windows-chrome)
- [windows firefox](https://github.com/vweevers/windows-firefox)
- [windows edge](https://github.com/eugeneware/windows-edge)
- [electron-stream](https://github.com/juliangruber/electron-stream)
- [phantomjs-stream](https://github.com/juliangruber/phantomjs-stream)## License
MIT