From b806f13c1a022982d690dea3e59412b45bf336ed Mon Sep 17 00:00:00 2001 From: Jakob Stendahl Date: Tue, 9 Feb 2021 10:50:55 +0100 Subject: :hammer: Add postbuild-script --- src/service-worker.js | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'src/service-worker.js') 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) { -- cgit v1.2.3