mirror of
https://gitlab.com/lecarore/breakout71.git
synced 2025-04-25 22:46:15 -04:00
Added staging deploy
This commit is contained in:
parent
934670b2a7
commit
c8c12fdd29
14 changed files with 242 additions and 164 deletions
221
dist/index.html
vendored
221
dist/index.html
vendored
File diff suppressed because one or more lines are too long
33
dist/sw-b71.js
vendored
Normal file
33
dist/sw-b71.js
vendored
Normal file
|
@ -0,0 +1,33 @@
|
|||
// The version of the cache.
|
||||
const VERSION = '29032991';
|
||||
// The name of the cache
|
||||
const CACHE_NAME = `breakout-71-${VERSION}`;
|
||||
// The static resources that the app needs to function.
|
||||
const APP_STATIC_RESOURCES = [
|
||||
"/"
|
||||
];
|
||||
// On install, cache the static resources
|
||||
self.addEventListener("install", (event)=>{
|
||||
event.waitUntil((async ()=>{
|
||||
const cache = await caches.open(CACHE_NAME);
|
||||
cache.addAll(APP_STATIC_RESOURCES);
|
||||
})());
|
||||
});
|
||||
// delete old caches on activate
|
||||
self.addEventListener("activate", (event)=>{
|
||||
event.waitUntil((async ()=>{
|
||||
const names = await caches.keys();
|
||||
await Promise.all(names.map((name)=>{
|
||||
if (name !== CACHE_NAME) return caches.delete(name);
|
||||
}));
|
||||
await clients.claim();
|
||||
})());
|
||||
});
|
||||
self.addEventListener("fetch", (event)=>{
|
||||
if (event.request.mode === "navigate" && event.request.url.endsWith('/index.html?isPWA=true')) {
|
||||
event.respondWith(caches.match("/"));
|
||||
return;
|
||||
}
|
||||
});
|
||||
|
||||
//# sourceMappingURL=sw-b71.js.map
|
1
dist/sw-b71.js.map
vendored
Normal file
1
dist/sw-b71.js.map
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
{"mappings":"AAAA,4BAA4B;AAC5B,MAAO,UAAU;AAEjB,wBAAwB;AACxB,MAAM,aAAa,CAAC,YAAY,EAAE,SAAS;AAE3C,uDAAuD;AACvD,MAAM,uBAAuB;IAC3B;CACD;AAED,yCAAyC;AACzC,KAAK,gBAAgB,CAAC,WAAW,CAAC;IAChC,MAAM,SAAS,CACb,AAAC,CAAA;QACC,MAAM,QAAQ,MAAM,OAAO,IAAI,CAAC;QAChC,MAAM,MAAM,CAAC;IACf,CAAA;AAEJ;AAEA,gCAAgC;AAChC,KAAK,gBAAgB,CAAC,YAAY,CAAC;IACjC,MAAM,SAAS,CACb,AAAC,CAAA;QACC,MAAM,QAAQ,MAAM,OAAO,IAAI;QAC/B,MAAM,QAAQ,GAAG,CACf,MAAM,GAAG,CAAC,CAAC;YACT,IAAI,SAAS,YACX,OAAO,OAAO,MAAM,CAAC;QAEzB;QAEF,MAAM,QAAQ,KAAK;IACrB,CAAA;AAEJ;AAEA,KAAK,gBAAgB,CAAC,SAAS,CAAC;IAC9B,IAAI,MAAM,OAAO,CAAC,IAAI,KAAK,cAAc,MAAM,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,2BAA2B;QAC7F,MAAM,WAAW,CAAC,OAAO,KAAK,CAAC;QAC/B;IACF;AACF","sources":["src/sw-b71.js"],"sourcesContent":["// The version of the cache.\nconst VERSION = '29032991'\n\n// The name of the cache\nconst CACHE_NAME = `breakout-71-${VERSION}`;\n\n// The static resources that the app needs to function.\nconst APP_STATIC_RESOURCES = [\n \"/\"\n];\n\n// On install, cache the static resources\nself.addEventListener(\"install\", (event) => {\n event.waitUntil(\n (async () => {\n const cache = await caches.open(CACHE_NAME);\n cache.addAll(APP_STATIC_RESOURCES);\n })(),\n );\n});\n\n// delete old caches on activate\nself.addEventListener(\"activate\", (event) => {\n event.waitUntil(\n (async () => {\n const names = await caches.keys();\n await Promise.all(\n names.map((name) => {\n if (name !== CACHE_NAME) {\n return caches.delete(name);\n }\n }),\n );\n await clients.claim();\n })(),\n );\n});\n\nself.addEventListener(\"fetch\", (event) => {\n if (event.request.mode === \"navigate\" && event.request.url.endsWith('/index.html?isPWA=true')) {\n event.respondWith(caches.match(\"/\"));\n return;\n }\n});\n"],"names":[],"version":3,"file":"sw-b71.js.map","sourceRoot":"/__parcel_source_root/"}
|
Loading…
Add table
Add a link
Reference in a new issue