apache / apache/cordova-browser
Add an optional flag to prevent opening a new browser tab
- Dominant language
- JavaScript
- Stars
- 174
- Forks
- 86
- Avg merge
- 8h 15m
- Merged PRs (30d)
- 6
Description
# Feature Request
## Motivation Behind Feature
In order to view file changes you need to stop and restart the browser server; when that is done Cordova opens a new tab on the active browser, even if a tab is already open for the Cordova project.
Having to close the currently open tab each time the server is rebooted gets annoying.
## Feature Description
Add a optional argument `--no-launch` which will start the server, but won't open a new browser window/tab.
Example:
`cordova run browser --no-launch`
## Alternatives or Workarounds
Using `cordova serve` achieves this functionality; however, serve currently has an issue with loading plugins:

(The plugins work as expected when using `cordova run browser` or `cordova run android`.)
Contributor guide
Research direction
Start at the `cordova run browser` entry point and trace how browser launch arguments are parsed and passed to the server. Check how `cordova serve` avoids opening a tab, then define completion as supporting `--no-launch` without changing the default launch behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- cli, web-dev
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100