|
|
|
|
|
by Lerc
524 days ago
|
|
Is there a super simple tool for turning statically served websites into PWAs? Last time I looked all of the simple tools had been deprecated in favour of complex tools that do way more than I need. If I had a site in a directory that works fine from >cd MyWebApp
>python3 -m http.server
I would like a command line tool That worked like >becomepwa MyWebApp
Which produced a PWA that downloaded everything on install and could be run henceforth offline.I thought this would be a common use case, but I failed to find anything that supported it without intruding on my workflow. |
|
* Manifest file
* HTTPS - for localhost I dont remember the workaround, browsers have made this increasingly more complicated from recent experiences
* Service Worker - This is where I said I had maybe 60 lines of JavaScript.
If you have these three things, a browser should pick up that your sites a PWA and server running it should be irrelevant... So you MUST have a minimal amount of JavaScript, but I did it using pure vanilla JS, you dont need a fancy framework.
On that same note, there might be a tool that could inject the bare JS necessary for this, but I dont think it exists, certainly could be built.