diff options
Diffstat (limited to 'src/service-worker.js')
-rw-r--r-- | src/service-worker.js | 10 |
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) { |