From cad30da87a7cf21d0db01ddb5e68bdf1f2322953 Mon Sep 17 00:00:00 2001 From: Romuald Brillout Date: Thu, 12 Sep 2024 12:35:54 +0200 Subject: [PATCH] minor refactor: rename installPinia => onCreateApp --- packages/vike-vue-pinia/integration/+config.ts | 2 +- .../integration/{installPinia.ts => onCreateApp.ts} | 4 ++-- packages/vike-vue-pinia/package.json | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) rename packages/vike-vue-pinia/integration/{installPinia.ts => onCreateApp.ts} (63%) diff --git a/packages/vike-vue-pinia/integration/+config.ts b/packages/vike-vue-pinia/integration/+config.ts index 32d698d9..e353f1fd 100644 --- a/packages/vike-vue-pinia/integration/+config.ts +++ b/packages/vike-vue-pinia/integration/+config.ts @@ -7,7 +7,7 @@ export default { require: { 'vike-vue': '>=0.7.0', }, - onCreateApp: 'import:vike-vue-pinia/__internal/integration/installPinia:installPinia', + onCreateApp: 'import:vike-vue-pinia/__internal/integration/onCreateApp:onCreateApp', onAfterRenderHtml: 'import:vike-vue-pinia/__internal/integration/dehydratePinia:dehydratePinia', onBeforeRenderClient: 'import:vike-vue-pinia/__internal/integration/hydratePinia:hydratePinia', } satisfies Config diff --git a/packages/vike-vue-pinia/integration/installPinia.ts b/packages/vike-vue-pinia/integration/onCreateApp.ts similarity index 63% rename from packages/vike-vue-pinia/integration/installPinia.ts rename to packages/vike-vue-pinia/integration/onCreateApp.ts index f1e16cdd..cab893e3 100644 --- a/packages/vike-vue-pinia/integration/installPinia.ts +++ b/packages/vike-vue-pinia/integration/onCreateApp.ts @@ -1,9 +1,9 @@ import { createPinia } from 'pinia' import type { OnCreateAppSync } from 'vike-vue/types' -export { installPinia } +export { onCreateApp } -const installPinia: OnCreateAppSync = (pageContext): ReturnType => { +const onCreateApp: OnCreateAppSync = (pageContext): ReturnType => { const pinia = createPinia() pageContext.app.use(pinia) Object.assign(pageContext, { pinia }) diff --git a/packages/vike-vue-pinia/package.json b/packages/vike-vue-pinia/package.json index ca8ed54d..f7c82f16 100644 --- a/packages/vike-vue-pinia/package.json +++ b/packages/vike-vue-pinia/package.json @@ -15,7 +15,7 @@ }, "exports": { "./config": "./dist/+config.js", - "./__internal/integration/installPinia": "./dist/installPinia.js", + "./__internal/integration/onCreateApp": "./dist/onCreateApp.js", "./__internal/integration/dehydratePinia": "./dist/dehydratePinia.js", "./__internal/integration/hydratePinia": "./dist/hydratePinia.js" }, @@ -24,8 +24,8 @@ "config": [ "./dist/+config.d.ts" ], - "__internal/integration/installPinia": [ - "./dist/installPinia.d.ts" + "__internal/integration/onCreateApp": [ + "./dist/onCreateApp.d.ts" ], "__internal/integration/dehydratePinia": [ "./dist/dehydratePinia.d.ts"