mirror of
https://github.com/ArthurDanjou/website-old.git
synced 2026-01-14 12:14:42 +01:00
💻 | Add Nuxt Storage
This commit is contained in:
4
@types/index.d.ts
vendored
4
@types/index.d.ts
vendored
@@ -2,6 +2,7 @@ import { NuxtAxiosInstance } from '@nuxtjs/axios'
|
||||
import VueI18n, {IVueI18n} from "vue-i18n";
|
||||
import {ColorModeInstance} from "@nuxtjs/color-mode/types/color-mode";
|
||||
import {NuxtApp} from "@nuxt/types/app";
|
||||
import {NuxtStorage} from "@nuxtjs/universal-storage";
|
||||
|
||||
declare module 'vue/types/vue' {
|
||||
|
||||
@@ -21,7 +22,8 @@ declare module '@nuxt/types' {
|
||||
$axios: NuxtAxiosInstance,
|
||||
i18n: VueI18n & IVueI18n
|
||||
$colorMode: ColorModeInstance,
|
||||
$app: NuxtApp
|
||||
$app: NuxtApp,
|
||||
$storage: NuxtStorage
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -12,11 +12,13 @@
|
||||
"@nuxt/content": "^1.14.0",
|
||||
"@nuxtjs/axios": "^5.13.1",
|
||||
"@nuxtjs/composition-api": "^0.22.4",
|
||||
"@nuxtjs/universal-storage": "^0.5.7",
|
||||
"core-js": "^3.10.0",
|
||||
"nuxt": "^2.15.3",
|
||||
"nuxt-i18n": "^6.22.3",
|
||||
"prism-themes": "^1.6.0",
|
||||
"sass": "^1.32.8"
|
||||
"sass": "^1.32.8",
|
||||
"windicss": "^2.5.11"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@nuxt/types": "^2.15.3",
|
||||
|
||||
@@ -3,8 +3,8 @@ import {NuxtOptionsModule} from "@nuxt/types/config/module";
|
||||
const axios = {
|
||||
credentials: true,
|
||||
baseURL: process.env.NODE_ENV == 'production'
|
||||
? 'https://my-domain.fr'
|
||||
: 'http://localhost:3333',
|
||||
? 'https://api.arthurdanjou.fr'
|
||||
: 'http://localhost:5555',
|
||||
}
|
||||
|
||||
const i18n = {
|
||||
@@ -49,8 +49,18 @@ const content = {
|
||||
}
|
||||
}
|
||||
|
||||
const storage = {
|
||||
cookie: {
|
||||
prefix: 'artsite',
|
||||
options: {
|
||||
path: '/'
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
export default [
|
||||
['@nuxtjs/axios', axios],
|
||||
['nuxt-i18n', i18n],
|
||||
['@nuxt/content', content],
|
||||
['@nuxtjs/universal-storage', storage]
|
||||
] as NuxtOptionsModule[]
|
||||
|
||||
25
yarn.lock
25
yarn.lock
@@ -1449,6 +1449,17 @@
|
||||
dependencies:
|
||||
http-proxy-middleware "^1.0.6"
|
||||
|
||||
"@nuxtjs/universal-storage@^0.5.7":
|
||||
version "0.5.7"
|
||||
resolved "https://registry.yarnpkg.com/@nuxtjs/universal-storage/-/universal-storage-0.5.7.tgz#39b2b2e0afbdb1a8bada3ea3281bfd52ddb827a1"
|
||||
integrity sha512-2lQ4ZgCKQ1W9qpf2nmmm4OmRUEjzykgA+P3YBJQNr+Qji+W3+N6l5q/kXlZEAw/8oz1HvhT8zvH296xo912R8w==
|
||||
dependencies:
|
||||
cookie "^0.4.1"
|
||||
defu "^3.2.2"
|
||||
dotprop "^1.2.1"
|
||||
upath "^2.0.1"
|
||||
uri-js "^4.4.1"
|
||||
|
||||
"@nuxtjs/youch@^4.2.3":
|
||||
version "4.2.3"
|
||||
resolved "https://registry.yarnpkg.com/@nuxtjs/youch/-/youch-4.2.3.tgz#36f8b22df5a0efaa81373109851e1d857aca6bed"
|
||||
@@ -3622,7 +3633,7 @@ cookie@^0.3.1:
|
||||
resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.3.1.tgz#e7e0a1f9ef43b4c8ba925c5c5a96e806d16873bb"
|
||||
integrity sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s=
|
||||
|
||||
cookie@^0.4.0:
|
||||
cookie@^0.4.0, cookie@^0.4.1:
|
||||
version "0.4.1"
|
||||
resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.1.tgz#afd713fe26ebd21ba95ceb61f9a8116e50a537d1"
|
||||
integrity sha512-ZwrFkGJxUR3EIoXtO+yVE69Eb7KlixbaeAWfBQB9vVsNn/o+Yw69gBWSSDK825hQNdN+wF8zELf3dFNl/kxkUA==
|
||||
@@ -4166,6 +4177,11 @@ dotenv@^8.2.0:
|
||||
resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-8.2.0.tgz#97e619259ada750eea3e4ea3e26bceea5424b16a"
|
||||
integrity sha512-8sJ78ElpbDJBHNeBzUbUVLsqKdccaa/BXF1uPTw3GrvQTBgrQrtObr2mUrE38vzYd8cEv+m/JBfDLioYcfXoaw==
|
||||
|
||||
dotprop@^1.2.1:
|
||||
version "1.2.1"
|
||||
resolved "https://registry.yarnpkg.com/dotprop/-/dotprop-1.2.1.tgz#7df88dd1c50ae4e93773475f85c84f77c302953b"
|
||||
integrity sha512-TcgsqnhHYytg+JKusKAwe4YLZWtD/vfOmblUEbSDZxQy1nlOQTChbyvj/f6kqKLUYbcJqie97rVhDc1JBs00LA==
|
||||
|
||||
duplexer@^0.1.2:
|
||||
version "0.1.2"
|
||||
resolved "https://registry.yarnpkg.com/duplexer/-/duplexer-0.1.2.tgz#3abe43aef3835f8ae077d136ddce0f276b0400e6"
|
||||
@@ -9711,7 +9727,7 @@ upper-case@^2.0.2:
|
||||
dependencies:
|
||||
tslib "^2.0.3"
|
||||
|
||||
uri-js@^4.2.2:
|
||||
uri-js@^4.2.2, uri-js@^4.4.1:
|
||||
version "4.4.1"
|
||||
resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e"
|
||||
integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==
|
||||
@@ -10156,6 +10172,11 @@ windicss@^2.3.0:
|
||||
resolved "https://registry.yarnpkg.com/windicss/-/windicss-2.5.7.tgz#aea36568cfb412e1c673468496e920f21ef06086"
|
||||
integrity sha512-gsWZkotmw9Hr7yZy2nJAp46pmgMO1wXFFa3rfLWm57KDM31U/AucksQnwZi7zxsKM9c6O/z/61/Uvv4J096zKA==
|
||||
|
||||
windicss@^2.5.11:
|
||||
version "2.5.11"
|
||||
resolved "https://registry.yarnpkg.com/windicss/-/windicss-2.5.11.tgz#dd4027c724c7b12a37746d1474b96a52239157d1"
|
||||
integrity sha512-u7b4rOPb8MwO1glkf0gdDygZ+lIzXb/PYLNjqni5Fe2684DCEt6dWTKdk3iMxXgbKoqRNncKu7xt3pFwXHdSAw==
|
||||
|
||||
windicss@^2.5.8:
|
||||
version "2.5.8"
|
||||
resolved "https://registry.yarnpkg.com/windicss/-/windicss-2.5.8.tgz#254980044de3031276062b90cfce53c13ee489bf"
|
||||
|
||||
Reference in New Issue
Block a user