generated from shgysk8zer0/static-template
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsw-config.js
68 lines (62 loc) · 2.31 KB
/
sw-config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
---
layout: null
---
/* eslint-env serviceworker */
/* eslint no-unused-vars: 0 */
const config = {
version: '{{ site.data.app.version | default: site.version }}',
fresh: [
/* Root document, pages, and posts */
'{{ site.pages | where: "pinned", true | map: "url" | join: "', '" }}',
'{{ site.posts | where: "pinned", true | map: "url" | join: "', '" }}',
'/webapp.webamanifest',
'https://apps.kernvalley.us/apps.json',
].map(path => new URL(path, location.origin).href),
stale: [
/* JS */
'{{ site.data.importmap.imports["@shgysk8zer0/polyfills"] }}',
'{{ site.data.importmap.imports["@shgysk8zer0/kazoo/"] }}harden.js',
'/js/index.min.js',
/* CSS */
'/css/index.min.css',
'{{ site.data.importmap.imports["@shgysk8zer0/components/"] }}button/share-to.css',
'{{ site.data.importmap.imports["@shgysk8zer0/components/"] }}github/user.css',
'{{ site.data.importmap.imports["@shgysk8zer0/components/"] }}install/prompt.css',
/* Data and JSON */
/* `customElements`templates */
'{{ site.data.importmap.imports["@shgysk8zer0/components/"] }}button/share-to.html',
'{{ site.data.importmap.imports["@shgysk8zer0/components/"] }}github/user.html',
'{{ site.data.importmap.imports["@shgysk8zer0/components/"] }}install/prompt.html',
/* Images & Icons */
'/img/icons.svg',
'/img/neon.svg',
'/img/apple-touch-icon.png',
'/img/icon-512.png',
'/img/icon-192.png',
'/img/icon-32.png',
'/img/favicon.svg',
'https://cdn.kernvalley.us/img/keep-kern-clean.svg',
'https://cdn.kernvalley.us/img/logos/play-badge.svg',
'https://cdn.kernvalley.us/img/logos/itunes-badge.svg',
'https://cdn.kernvalley.us/img/logos/windows-badge.svg',
'https://cdn.kernvalley.us/img/logos/instagram.svg',
'https://cdn.kernvalley.us/img/markers.svg',
/* Fonts */
'https://cdn.kernvalley.us/fonts/roboto.woff2',
].map(path => new URL(path, location.origin).href),
allowed: [
'https://maps.wikimedia.org/osm-intl/',
'/https://i.imgur.com/',
'/https://secure.gravatar.com/avatar/',
/https:\/\/*\.githubusercontent\.com\/u\/*/,
/\.(jpg|png|webp|svg|gif)$/,
],
allowedFresh: [
'https://www.google-analytics.com/analytics.js',
'https://www.googletagmanager.com/gtag/js',
'https://baconipsum.com/api/',
'https://api.github.com/users/',
'https://api.openweathermap.org/data/',
/\.(html|css|js|json)$/,
]
};