Skip to content

Commit

Permalink
some config in workbox & change icon
Browse files Browse the repository at this point in the history
  • Loading branch information
adnanfajlur committed Apr 9, 2018
1 parent cb19609 commit 9d2e467
Show file tree
Hide file tree
Showing 17 changed files with 22 additions and 136 deletions.
2 changes: 1 addition & 1 deletion firebase.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"hosting": {
"public": "public",
"public": "src",
"ignore": [
"firebase.json",
"**/.*",
Expand Down
6 changes: 6 additions & 0 deletions src-sw.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

importScripts('https://storage.googleapis.com/workbox-cdn/releases/3.0.0/workbox-sw.js');

console.log('this is my custom service worker');

workbox.precaching.precacheAndRoute([]);
Binary file removed src/img/android-chrome-192x192.png
Binary file not shown.
Binary file removed src/img/android-chrome-512x512.png
Binary file not shown.
Binary file removed src/img/apple-touch-icon.png
Binary file not shown.
9 changes: 0 additions & 9 deletions src/img/browserconfig.xml

This file was deleted.

Binary file removed src/img/favicon-16x16.png
Binary file not shown.
Binary file removed src/img/favicon-32x32.png
Binary file not shown.
Binary file removed src/img/favicon.ico
Binary file not shown.
Binary file added src/img/icon/coffe-32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/img/icon/favicon.ico
Binary file not shown.
Binary file removed src/img/mstile-150x150.png
Binary file not shown.
44 changes: 0 additions & 44 deletions src/img/safari-pinned-tab.svg

This file was deleted.

19 changes: 0 additions & 19 deletions src/img/site.webmanifest

This file was deleted.

4 changes: 2 additions & 2 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="UTF-8">
<title>PVHNPWA</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0">
<link rel="icon" type="image/png" sizes="16x16" href="/img/favicon-16x16.png">
<link rel='shortcut icon' type='image/x-icon' href='./img/icon/favicon.ico' />
<style>
body {
margin: 0;
Expand Down Expand Up @@ -102,7 +102,7 @@
<body>
<div class="wrapAppbar">
<div class="appbar">
<img src="./img/favicon-32x32.png">
<img src="./img/icon/coffe-32.png">
<div class="linkMenu">
<p id="link" onclick="changeUrl('/?page=1')">Top</p>
<p id="linknews" onclick="changeUrl('/news?page=1')">News</p>
Expand Down
71 changes: 11 additions & 60 deletions src/sw.js
Original file line number Diff line number Diff line change
@@ -1,71 +1,24 @@
/**
* Welcome to your Workbox-powered service worker!
*
* You'll need to register this file in your web app and you should
* disable HTTP caching for this file too.
* See https://goo.gl/nhQhGp
*
* The rest of the code is auto-generated. Please don't update this file
* directly; instead, make changes to your Workbox build configuration
* and re-run your build process.
* See https://goo.gl/2aRDsh
*/

importScripts("https://storage.googleapis.com/workbox-cdn/releases/3.0.1/workbox-sw.js");
importScripts('https://storage.googleapis.com/workbox-cdn/releases/3.0.0/workbox-sw.js');

/**
* The workboxSW.precacheAndRoute() method efficiently caches and responds to
* requests for URLs in the manifest.
* See https://goo.gl/S9QRab
*/
self.__precacheManifest = [
{
"url": "img/android-chrome-192x192.png",
"revision": "df6540dd80e37ed3b52bb77684e0a586"
},
{
"url": "img/android-chrome-512x512.png",
"revision": "16da4c86dbd11c9bd5ed41cf7fda8a84"
},
{
"url": "img/apple-touch-icon.png",
"revision": "23012b5d7f0c0ea06ce0e1b8d46ecba5"
},
{
"url": "img/browserconfig.xml",
"revision": "a493ba0aa0b8ec8068d786d7248bb92c"
},
{
"url": "img/favicon-16x16.png",
"revision": "7011658cb3bca0668022f18af2cf1dee"
},
{
"url": "img/favicon-32x32.png",
"revision": "dc86c1763dd8666dec429eb95f95fcd6"
},
{
"url": "img/favicon.ico",
"revision": "f3f70846cad486fc894f0d6145364266"
},
{
"url": "img/mstile-150x150.png",
"revision": "300683ed9f564822f6fd16b194c213ae"
},
console.log('this is my custom service worker');

workbox.precaching.precacheAndRoute([
{
"url": "img/safari-pinned-tab.svg",
"revision": "b3aae41d39e7e23421e5eac20f47d057"
"url": "img/icon/coffe-32.png",
"revision": "3e0951a9fdde86a8172867a189eb404c"
},
{
"url": "img/site.webmanifest",
"revision": "b9aa277fcfc34c31db6c7a7ea3469b8c"
"url": "img/icon/favicon.ico",
"revision": "811544eeac820d3eca1f54448e79fee9"
},
{
"url": "index.html",
"revision": "311775668ca02d6b68afad51ae667219"
"revision": "1d2d4ce99fd817d0abd2db3e569a702e"
},
{
"url": "js/app.js",
"revision": "f3bdf7302ea46c95da718be718445d54"
"revision": "603db79e42b22b80bdf7c865e9048366"
},
{
"url": "js/buatElement.js",
Expand All @@ -75,6 +28,4 @@ self.__precacheManifest = [
"url": "js/renderDom.js",
"revision": "8bc43853925caacc59f7f3fab634fee4"
}
].concat(self.__precacheManifest || []);
workbox.precaching.suppressWarnings();
workbox.precaching.precacheAndRoute(self.__precacheManifest, {});
]);
3 changes: 2 additions & 1 deletion workbox-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ module.exports = {
"globPatterns": [
"**/*.{png,xml,ico,svg,webmanifest,html,js}"
],
"swDest": "src/sw.js"
"swDest": "src/sw.js",
"swSrc": "src-sw.js"
};

0 comments on commit 9d2e467

Please sign in to comment.