-
Notifications
You must be signed in to change notification settings - Fork 147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add template for PWA #454
Comments
I'd be open to a PR for this. What would you have in mind specifically for making the progressive template? |
I want my web app to run on desktop and mobile devices like native app, offline, with notification support and possibility to distribute it as an anroid .apk. Which is supported by PWA. To make web project a PWA, you basically need to set up servise worker to get it work offline and add a manifest with icons. But the devil in the details. I don't have any experience with js and little experience with cljs, it's a dark forest for me. When I tried to implement PWA with my pet project, I failed. ServiceWorker is saving cache, but the app is not working offline, probably because I haven't cached all the important stuff. I got stuck at this point (commit with worker). I also implemented the same with clojurscript, but it had problems with servicWorker registration. May be the PWA will also be a nice feature for you 3rd Web Development with Clojure book. Ideally I would want to be able to do: |
Ah I see, I don't have any experience with PWAs myself either unfortunately. It might be worth checking on Clojurians slack to see if anybody got this working already. And I'll take a look to see if it's something I can add to the book. A |
Maybe a CLJS wrapper around https://github.com/GoogleChrome/workbox ? |
Oh I haven't seen workbox before, looks like it would be a good fit. |
Good news! There is a library page-renderer that uses GoogleChrome/workbox inside. I was able to pass lighthouse audit (pwa test) which confirmed that my app is a PWA. Here is the commit with the changes I made. |
Nice, that looks really straight forward. Might be best to just add it to the docs then as an example. |
Yes, I think docs would be enough. I also created an example project https://github.com/Liverm0r/PWA-clojure |
It would be nice to have Progressive web app template.
The text was updated successfully, but these errors were encountered: