Remove offline example

This commit is contained in:
Sébastien Chopin 2017-07-08 20:16:01 +02:00
parent 56272eb5fd
commit 592f8cc733
4 changed files with 0 additions and 39 deletions

View File

@ -1,6 +0,0 @@
module.exports = {
offline: true, // true or https://github.com/NekR/offline-plugin/blob/master/docs/options.md
plugins: [
{ src: '~plugins/offline.js', ssr: false }
]
}

View File

@ -1,11 +0,0 @@
{
"name": "offline-config-nuxt",
"scripts": {
"dev": "nuxt",
"build": "nuxt build",
"start": "nuxt start"
},
"dependencies": {
"nuxt": "latest"
}
}

View File

@ -1,3 +0,0 @@
<template>
<div>This is offline test</div>
</template>

View File

@ -1,19 +0,0 @@
if (process.env.NODE_ENV === 'production') {
var OfflinePlugin = require('offline-plugin/runtime')
window.onNuxtReady(() => {
OfflinePlugin.install({
onInstalled: function () {
console.log('Offline plugin installed.') // eslint-disable-line no-console
},
onUpdating: function () {
},
onUpdateReady: function () {
OfflinePlugin.applyUpdate()
},
onUpdated: function () {
window.location.reload()
}
})
})
}