PWAsForFirefox
PWAsForFirefox copied to clipboard
Support local open / close scripts with launching & closing of PWA
Problem Description
A typical workflow of a user when working with local or development-time PWA apps is to:
- open a terminal window, start the webserver for the web application
- open the website (either via browser tab, pwasforfirefox, etc.)
- close the window/tab, and depending on context go back to the terminal window to stop the webserver
One could write their own script to handle the first two steps of launching the local webserver and opening the associated PWAsForFirefox desktop entry, but that wouldn't cover the closing aspect.
Proposed Solution
I'm curious if, barring any sandbox issues, PWAsForFirefox could support a configuration that enclosed launching/closing script support. This could be used to:
- Automatically launch a (local) webserver upon starting the associated PWA window.
- Close a (local) webserver upon closing the last associated PWA window.
Some scaffolding would also need to be provided when writing such a script to ensure that:
- For the opening script, detect if instance of the same PWAsForFirefox is already open. Generally most webserver starts will
- For the closing script, one can detect if there are multiple instances of PWAsForFirefox already open so that a webserver isn't prematurely shut down if other windows need it.
Is this possible or would such a workflow be better served by a different (i.e. electron-based) tool?