diff --git a/.gitignore b/.gitignore index 450048e..4df926c 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ *.pyc *.log /index.html +/service-worker.js /js/version.json cache.manifest tiles/ diff --git a/DEVELOPER_README.md b/DEVELOPER_README.md index 2cf294a..6f38d04 100644 --- a/DEVELOPER_README.md +++ b/DEVELOPER_README.md @@ -4,6 +4,6 @@ To get a copy of the code and run a test web server: 1. [Fork the repository](https://github.com/projecthorus/sondehub-tracker/fork) by visiting [https://github.com/projecthorus/sondehub-tracker/fork](https://github.com/projecthorus/sondehub-tracker/fork). 2. Clone the repository with your git tool of choice. -3. Run `build.sh` to generate `index.html` and `js/version.json`. +3. Run `build.sh` to generate `index.html`, `service-worker.js`, and `js/version.json`. 4. Run `python serve.py` to run a simple web server to (This requires python 3.x) 5. Visit [http://localhost:8000](http://localhost:8000) to view the local version of the server! diff --git a/build.sh b/build.sh index 096c1c0..948cde1 100755 --- a/build.sh +++ b/build.sh @@ -15,4 +15,8 @@ echo -n "Generating index.html... " sed -e "s/{VER}/$VERSION/" -e "s/{BUILD_DATE}/$BUILD_DATE/" index.template.html > index.html echo "Done!" +echo -n "Generating service-worker.js... " +sed -e "s/{VER}/$VERSION/" service-worker.template.js > service-worker.js +echo "Done!" + echo "Build version: $VERSION Build date: $BUILD_DATE" diff --git a/index.template.html b/index.template.html index e24fbe0..8a10079 100644 --- a/index.template.html +++ b/index.template.html @@ -50,7 +50,7 @@ -
+