sw-adversaries
sw-adversaries copied to clipboard
Add systems needed to allow application to run as a PWA.
Description
When using the this application I found that it contains all of the needed systems for offline capabilities so I wanted to add the ability for the application to be installed via a PWA from a browser. I do believe the currently live version of this application is not hosted with HTTPS so this would not work unless that was changed but it shouldn't cause any problems with it either.
I used some images on the web for the old republic empire logo as the application SPA logo due to the stormtrooper ico file being difficult to use at the larger pixel sizes. Let me know if there is a specific image you want to use and I can change these out.
Also I'm not very familiar with gulp so let me know if there are changes that should be made there too, thanks.
Testing
- To test this the application should be able to be installed (in dev mode) without needing to be HTTPS from a browsers PWA install button (for chrome/edge should be located in the address bar).
- If you want to test this ability in production the application would need to be ran and secured using HTTPS due to browser requirements for HTTPS with
PWA
s. - The application should be able to be ran offline.
Change Log
- Updated index to contain a script to register the needed install event.
- Added manifest file to provide browsers with PWA metadata.
- Add service worker per requirement of a PWA based on information at web.dev.
- Add required PWA icons - these should be replaced with icons that better represent the application.
- Update gulp to contain required gulp build tasks.