This repository contains a simple Ionic app using Angular and Capacitor, whose purpose is it to generate random numbers for the German lottery (6 out of 49).
The app is also offered as Progressive Web App (PWA), which can be accessed under the following URL:
https://mdecker-mobilecomputing.github.io/Ionic_Lottozahlen/
Create the project with Capacitor:
ionic start lottozahlen blank --type=angular --capacitor
The minimum version of capacitor required is 3.0. Use the following command to check the version of capacitor:
npx cap --version
If the version according to the output of this command is less than 3.0, then use the following command to upgrade capacitor:
npm install @capacitor/cli@next @capacitor/core@next
The following command is needed to turn the app into a PWA:
ng add @angular/pwa
The commands adds the ServiceWorker and the Web App Manifest (see here).
To generate the PWA to be served on GitHub Pages, on Windows the batch file bauePwaFuerGitHubPages.bat has to be executed, while on MacOS and Linux the Bash script bauePwaFuerGitHubPages.sh has to be executed. After this the (updated) PWA should be in folder docs/.
To generate the PWA to be served by Firebase Hosting there are two similar scripts, namely bauePwaFuerFirebaseHosting.bat and bauePwaFuerFirebaseHosting.sh.
When you push the new files in folder docs/
to the GitHub repository, then the updated app should be available under the following
URL within a few minutes: https://mdecker-mobilecomputing.github.io/Ionic_Lottozahlen/
See the LICENSE file for license rights and limitations (BSD 3-Clause License) for the files in this repository.