forked from massif-press/compcon
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
27 changed files
with
335 additions
and
39 deletions.
There are no files selected for viewing
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 was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
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,2 @@ | ||
User-agent: * | ||
Disallow: |
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
File renamed without changes.
File renamed without changes.
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 |
---|---|---|
@@ -1,12 +1,47 @@ | ||
// if ('serviceWorker' in navigator && process.env.VUE_APP_NODE_ENV === 'production') { | ||
// window.addEventListener('load', () => { | ||
// navigator.serviceWorker | ||
// .register('/sw.js') | ||
// .then(registration => { | ||
// console.log('SW registered: ', registration) | ||
// }) | ||
// .catch(registrationError => { | ||
// console.log('SW registration failed: ', registrationError) | ||
// }) | ||
// }) | ||
// } | ||
/* eslint-disable no-console */ | ||
|
||
import { register } from 'register-service-worker' | ||
|
||
if (process.env.VUE_APP_NODE_ENV === 'production') { | ||
register(`${process.env.BASE_URL}service-worker.js`, { | ||
ready() { | ||
console.log(process.env.BASE_URL) | ||
console.log( | ||
'App is being served from cache by a service worker.\n' + | ||
'For more details, visit https://goo.gl/AFskqB' | ||
) | ||
}, | ||
registered() { | ||
console.info('Service worker has been registered.') | ||
}, | ||
cached() { | ||
console.info('Content has been cached for offline use.') | ||
}, | ||
updatefound() { | ||
console.info('New content is downloading.') | ||
}, | ||
updated() { | ||
console.info('New content is available; please refresh.') | ||
}, | ||
offline() { | ||
console.info('No internet connection found. App is running in offline mode.') | ||
}, | ||
error(error) { | ||
console.error('Error during service worker registration:', error) | ||
} | ||
}) | ||
|
||
|
||
if ('serviceWorker' in navigator) { | ||
window.addEventListener('load', () => { | ||
navigator.serviceWorker | ||
.register('/sw.js') | ||
.then(registration => { | ||
console.log('SW registered: ', registration) | ||
}) | ||
.catch(registrationError => { | ||
console.log('SW registration failed: ', registrationError) | ||
}) | ||
}) | ||
} | ||
} |
File renamed without changes.
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
Oops, something went wrong.