Add:Initial setup for PWA #354

This commit is contained in:
advplyr 2022-02-08 19:09:24 -06:00
parent 3906031d62
commit 42e7b7f590
4 changed files with 102 additions and 3 deletions

4
.gitignore vendored
View File

@ -9,4 +9,6 @@ node_modules/
test/
/client/.nuxt/
/client/dist/
/dist/
/dist/
sw.*

View File

@ -64,6 +64,7 @@ module.exports = {
buildModules: [
// https://go.nuxtjs.dev/tailwindcss
'@nuxtjs/tailwindcss',
'@nuxtjs/pwa'
],
// Modules: https://go.nuxtjs.dev/config-modules
@ -97,6 +98,26 @@ module.exports = {
baseURL: process.env.serverUrl || ''
},
// nuxt/pwa https://pwa.nuxtjs.org
pwa: {
icon: {
source: 'Logo.png'
},
meta: {
appleStatusBarStyle: 'black-translucent',
name: 'Audiobookshelf',
theme_color: '#373838'
},
manifest: {
name: 'Audiobookshelf',
short_name: 'Audiobookshelf',
background_color: '#373838'
},
// workbox: {
// enabled: true // TEMP for dev
// }
},
// Build Configuration: https://go.nuxtjs.dev/config-build
build: {},
watchers: {

View File

@ -1,6 +1,6 @@
{
"name": "audiobookshelf-client",
"version": "1.6.13",
"version": "1.6.65",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
@ -2111,6 +2111,31 @@
"http-proxy-middleware": "^1.0.6"
}
},
"@nuxtjs/pwa": {
"version": "3.3.5",
"resolved": "https://registry.npmjs.org/@nuxtjs/pwa/-/pwa-3.3.5.tgz",
"integrity": "sha512-8tTmW8DBspWxlJwTimOHTkwfkwPpL9wIcGmy75Gcmin+c9YtX2Ehxmhgt/TLFOC9XsLAqojqynw3/Agr/9OE1w==",
"dev": true,
"requires": {
"clone-deep": "^4.0.1",
"defu": "^3.2.2",
"execa": "^5.0.0",
"fs-extra": "^9.1.0",
"hasha": "^5.2.2",
"jimp-compact": "^0.16.1",
"lodash.template": "^4.5.0",
"serve-static": "^1.14.1",
"workbox-cdn": "^5.1.4"
},
"dependencies": {
"defu": {
"version": "3.2.2",
"resolved": "https://registry.npmjs.org/defu/-/defu-3.2.2.tgz",
"integrity": "sha512-8UWj5lNv7HD+kB0e9w77Z7TdQlbUYDVWqITLHNqFIn6khrNHv5WQo38Dcm1f6HeNyZf0U7UbPf6WeZDSdCzGDQ==",
"dev": true
}
}
},
"@nuxtjs/tailwindcss": {
"version": "4.2.1",
"resolved": "https://registry.npmjs.org/@nuxtjs/tailwindcss/-/tailwindcss-4.2.1.tgz",
@ -4151,6 +4176,17 @@
}
}
},
"clone-deep": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz",
"integrity": "sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==",
"dev": true,
"requires": {
"is-plain-object": "^2.0.4",
"kind-of": "^6.0.2",
"shallow-clone": "^3.0.0"
}
},
"co": {
"version": "4.6.0",
"resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz",
@ -6394,6 +6430,24 @@
"minimalistic-assert": "^1.0.1"
}
},
"hasha": {
"version": "5.2.2",
"resolved": "https://registry.npmjs.org/hasha/-/hasha-5.2.2.tgz",
"integrity": "sha512-Hrp5vIK/xr5SkeN2onO32H0MgNZ0f17HRNH39WfL0SYUNOTZ5Lz1TJ8Pajo/87dYGEFlLMm7mIc/k/s6Bvz9HQ==",
"dev": true,
"requires": {
"is-stream": "^2.0.0",
"type-fest": "^0.8.0"
},
"dependencies": {
"type-fest": {
"version": "0.8.1",
"resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz",
"integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==",
"dev": true
}
}
},
"he": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz",
@ -7149,6 +7203,12 @@
}
}
},
"jimp-compact": {
"version": "0.16.1",
"resolved": "https://registry.npmjs.org/jimp-compact/-/jimp-compact-0.16.1.tgz",
"integrity": "sha512-dZ6Ra7u1G8c4Letq/B5EzAxj4tLFHL+cGtdpR+PVm4yzPDj+lCk+AbivWt1eOM+ikzkowtyV7qSqX6qr3t71Ww==",
"dev": true
},
"jiti": {
"version": "1.11.0",
"resolved": "https://registry.npmjs.org/jiti/-/jiti-1.11.0.tgz",
@ -11947,6 +12007,15 @@
"safe-buffer": "^5.0.1"
}
},
"shallow-clone": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz",
"integrity": "sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==",
"dev": true,
"requires": {
"kind-of": "^6.0.2"
}
},
"shebang-command": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
@ -14242,6 +14311,12 @@
}
}
},
"workbox-cdn": {
"version": "5.1.4",
"resolved": "https://registry.npmjs.org/workbox-cdn/-/workbox-cdn-5.1.4.tgz",
"integrity": "sha512-04gM3mi8QGutokkSaA9xunVfjURnLbo9TTWyi8+pSDCEW5cD8u5GbJiliLK1vB9CShk/9OY1UDfW+XcmD+d6KQ==",
"dev": true
},
"worker-farm": {
"version": "1.7.0",
"resolved": "https://registry.npmjs.org/worker-farm/-/worker-farm-1.7.0.tgz",

View File

@ -28,7 +28,8 @@
"vuedraggable": "^2.24.3"
},
"devDependencies": {
"@nuxtjs/pwa": "^3.3.5",
"@nuxtjs/tailwindcss": "^4.2.1",
"postcss": "^8.3.6"
}
}
}