-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add manual changes to make dist2 progressive
The dist2 folder was built using npm run build, and then updated manually afterwards
- Loading branch information
1 parent
3f6b2d6
commit ab5fd02
Showing
4 changed files
with
49 additions
and
0 deletions.
There are no files selected for viewing
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"short_name": "Progessive Elm", | ||
"name": "Minimal progressive Elm App, to demonstrate the steps involved", | ||
"icons": [ | ||
{ | ||
"src": "icon.png", | ||
"sizes": "192x192", | ||
"type": "image/png" | ||
} | ||
], | ||
"start_url": "./index.html", | ||
"display": "standalone", | ||
"theme_color": "#000000", | ||
"background_color": "#ffffff" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
self.addEventListener('install', function(e) { | ||
e.waitUntil( | ||
caches.open('progessive-elm').then(function(cache) { | ||
return cache.addAll([ | ||
'/', | ||
'/index.html', | ||
]); | ||
}) | ||
); | ||
}); | ||
|
||
self.addEventListener('fetch', function(event) { | ||
console.log('Service Worker Intercept: ' + event.request.url); | ||
|
||
event.respondWith( | ||
|
||
caches.match(event.request).then(function(response) { | ||
|
||
console.log('Service Worker Serve: ' + event.request.url); | ||
|
||
return response || fetch(event.request); | ||
|
||
}) | ||
|
||
); | ||
}); |