Skip to content

Commit

Permalink
last changes
Browse files Browse the repository at this point in the history
  • Loading branch information
arjunpat committed Aug 18, 2018
1 parent d0919ae commit ff8cf80
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bell-countdown",
"version": "1.0.0",
"version": "2.0.1",
"description": "A countdown timer for MVHS's complicated schedules.",
"main": "server.js",
"scripts": {
Expand Down
1 change: 0 additions & 1 deletion public/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ analytics.setPathname(window.location.pathname);
// add service workers
/*if (navigator.serviceWorker) {
navigator.serviceWorker.register('/sw.js').then((reg) => {
console.log(reg);
Logger.log('main', 'service worker registered');
}).catch(err => {
Logger.log('main', 'service worker registration failed');
Expand Down
3 changes: 0 additions & 3 deletions public/js/sw.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,18 +87,15 @@ this.onfetch = (e) => {
let resClone = res.clone();

if (FILES.some(val => pathname === val)) {
console.log('saved', pathname);
caches.open(APP_VERSION).then( cache => cache.put(pathname, resClone) );
}

return res;
}).catch(err => {

if (FILES.some(val => pathname === val)) {
console.log('matched', pathname);
return caches.match(e.request);
} else {
console.log('not matched', pathname);
return err;
}

Expand Down
2 changes: 2 additions & 0 deletions scripts/build-client.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,12 @@ cat public/css/index.css >> client-dist/css/bundle.css
cat public/css/not-found.css >> client-dist/css/bundle.css
cat public/css/settings.css >> client-dist/css/bundle.css
cat public/css/modal.css >> client-dist/css/bundle.css
cat public/css/notifications.css >> client-dist/css/bundle.css

# html & others ------------------------

cat public/index.html > client-dist/index.html
cat public/extension-connection.html > client-dist/extension-connection.html
cat public/manifest.json > client-dist/manifest.json
cp -rf public/images/ client-dist/images/

Expand Down

0 comments on commit ff8cf80

Please sign in to comment.