From 3c85206da031fe47311e1a6dabdb8a6982daddda Mon Sep 17 00:00:00 2001 From: Settel Date: Fri, 29 Jul 2022 15:00:29 +0200 Subject: [PATCH] feat: use Pinia --- client/nuxt.config.ts | 7 ++++++- client/package.json | 3 +++ client/tsconfig.json | 5 ++++- client/yarn.lock | 25 +++++++++++++++++++++++-- 4 files changed, 36 insertions(+), 4 deletions(-) diff --git a/client/nuxt.config.ts b/client/nuxt.config.ts index 4fe3982..56d3c36 100644 --- a/client/nuxt.config.ts +++ b/client/nuxt.config.ts @@ -4,7 +4,12 @@ export default defineNuxtConfig({ ssr: false, srcDir: 'src/', target: 'static', - modules: ['@nuxtjs/proxy'], + modules: [ + '@nuxtjs/proxy', + ], + buildModules: [ + '@pinia/nuxt' + ], proxy: { '/api/': 'http://localhost:32039', } diff --git a/client/package.json b/client/package.json index 2a7d1f0..288adda 100644 --- a/client/package.json +++ b/client/package.json @@ -13,5 +13,8 @@ "nuxt": "3.0.0-rc.6", "sass": "^1.54.0", "sass-loader": "^13.0.2" + }, + "dependencies": { + "@pinia/nuxt": "^0.3.1" } } diff --git a/client/tsconfig.json b/client/tsconfig.json index ba5d712..d203240 100644 --- a/client/tsconfig.json +++ b/client/tsconfig.json @@ -1,5 +1,8 @@ { "include": ["src/**/*"], // https://v3.nuxtjs.org/concepts/typescript - "extends": "./.nuxt/tsconfig.json" + "extends": "./.nuxt/tsconfig.json", + "types": [ + "@pinia/nuxt" + ] } diff --git a/client/yarn.lock b/client/yarn.lock index 398bcd2..f8b7256 100644 --- a/client/yarn.lock +++ b/client/yarn.lock @@ -400,7 +400,7 @@ unimport "^0.1.6" untyped "^0.4.4" -"@nuxt/kit@^3.0.0-rc.6": +"@nuxt/kit@3.0.0-rc.6", "@nuxt/kit@^3.0.0-rc.6": version "3.0.0-rc.6" resolved "https://registry.yarnpkg.com/@nuxt/kit/-/kit-3.0.0-rc.6.tgz#b59c10639cb591bdc5a63164fb352b344230a065" integrity sha512-+lxSd6dSWlAzMXfGOPcY4856xnMF1Ck1rycFUZ+K2QYiDXphq/fiW2eMaWLVvqgPyL2Box2WzVDZJ6C5ceptcw== @@ -515,6 +515,14 @@ dependencies: http-proxy-middleware "^1.0.6" +"@pinia/nuxt@^0.3.1": + version "0.3.1" + resolved "https://registry.yarnpkg.com/@pinia/nuxt/-/nuxt-0.3.1.tgz#30d9a3fee43c4ff485694ecad4b44fdfe064079e" + integrity sha512-JoDvTolUrJPfe9xEmvHz0jRqd3vYzuStqtt1k3SgwHChIWxxnlZ8hmU1RlXIh51RGL549LeXupSiKGydDIYc2A== + dependencies: + "@nuxt/kit" "3.0.0-rc.6" + pinia ">=2.0.17" + "@rollup/plugin-alias@^3.1.9": version "3.1.9" resolved "https://registry.yarnpkg.com/@rollup/plugin-alias/-/plugin-alias-3.1.9.tgz#a5d267548fe48441f34be8323fb64d1d4a1b3fdf" @@ -741,7 +749,7 @@ "@vue/compiler-dom" "3.2.37" "@vue/shared" "3.2.37" -"@vue/devtools-api@^6.1.4": +"@vue/devtools-api@^6.1.4", "@vue/devtools-api@^6.2.1": version "6.2.1" resolved "https://registry.yarnpkg.com/@vue/devtools-api/-/devtools-api-6.2.1.tgz#6f2948ff002ec46df01420dfeff91de16c5b4092" integrity sha512-OEgAMeQXvCoJ+1x8WyQuVZzFo0wcyCmUR3baRVLmKBo1LmYZWMlRiXlux5jd0fqVJu6PfDbOrZItVqUEzLobeQ== @@ -3074,6 +3082,14 @@ pify@^2.3.0: resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" integrity sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog== +pinia@>=2.0.17: + version "2.0.17" + resolved "https://registry.yarnpkg.com/pinia/-/pinia-2.0.17.tgz#f925e5e4f73c15e16dfb4838176a9ca50752f26b" + integrity sha512-AtwLwEWQgIjofjgeFT+nxbnK5lT2QwQjaHNEDqpsi2AiCwf/NY78uWTeHUyEhiiJy8+sBmw0ujgQMoQbWiZDfA== + dependencies: + "@vue/devtools-api" "^6.2.1" + vue-demi "*" + pkg-types@^0.3.2, pkg-types@^0.3.3: version "0.3.3" resolved "https://registry.yarnpkg.com/pkg-types/-/pkg-types-0.3.3.tgz#3c25e45274e1c586ec7811dcc3449afde846e463" @@ -4221,6 +4237,11 @@ vue-bundle-renderer@^0.3.9: dependencies: bundle-runner "^0.0.1" +vue-demi@*: + version "0.13.6" + resolved "https://registry.yarnpkg.com/vue-demi/-/vue-demi-0.13.6.tgz#f9433cbd75e68a970dec066647f4ba6c08ced48f" + integrity sha512-02NYpxgyGE2kKGegRPYlNQSL1UWfA/+JqvzhGCOYjhfbLWXU5QQX0+9pAm/R2sCOPKr5NBxVIab7fvFU0B1RxQ== + vue-router@^4.1.2: version "4.1.2" resolved "https://registry.yarnpkg.com/vue-router/-/vue-router-4.1.2.tgz#ae08f63c9610afa6bff6743e8f128b7054d4c9f5"