aboutsummaryrefslogtreecommitdiff
path: root/src/service-worker.js
diff options
context:
space:
mode:
authorJakob Stendahl <jakob.stendahl@outlook.com>2021-02-09 10:50:55 +0100
committerJakob Stendahl <jakob.stendahl@outlook.com>2021-02-09 10:50:55 +0100
commitb806f13c1a022982d690dea3e59412b45bf336ed (patch)
tree52658cbe39219047d2af2d044039e26b68964829 /src/service-worker.js
parent3125ad62e4f7cc7532e6f8b8c664b4863f58acd7 (diff)
downloadhoverbit-ble-b806f13c1a022982d690dea3e59412b45bf336ed.tar.gz
hoverbit-ble-b806f13c1a022982d690dea3e59412b45bf336ed.zip
:hammer: Add postbuild-script
Diffstat (limited to 'src/service-worker.js')
-rw-r--r--src/service-worker.js10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/service-worker.js b/src/service-worker.js
index bc3f42d..96accb3 100644
--- a/src/service-worker.js
+++ b/src/service-worker.js
@@ -1,13 +1,7 @@
var APP_PREFIX = 'hoverbitcontroller' // Identifier for this app (this needs to be consistent across every cache update)
-var VERSION = 'version_01' // Version of the off-line cache (change this value everytime you want to update cache)
+var VERSION = '{{ VERSION }}' // Version of the off-line cache (change this value everytime you want to update cache)
var CACHE_NAME = APP_PREFIX + VERSION
-var URLS = [ // Add URL you want to cache in this list.
- '/hoverbit-ble/', // If you have separate JS/CSS files,
- '/hoverbit-ble/index.html', // add path to those files here
- '/hoverbit-ble/styles.css',
- '/hoverbit-ble/microbit.umd.js',
- '/hoverbit-ble/script.js'
-]
+var URLS = ["{{ CACHE_FILES }}"] // This will be replaced by the deploy-script
// Respond with cached resources
self.addEventListener('fetch', function (e) {