Skip to content

Commit

Permalink
minor refactor: rename installPinia => onCreateApp
Browse files Browse the repository at this point in the history
  • Loading branch information
brillout committed Sep 12, 2024
1 parent 0fb411f commit cad30da
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion packages/vike-vue-pinia/integration/+config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { createPinia } from 'pinia'
import type { OnCreateAppSync } from 'vike-vue/types'

export { installPinia }
export { onCreateApp }

const installPinia: OnCreateAppSync = (pageContext): ReturnType<OnCreateAppSync> => {
const onCreateApp: OnCreateAppSync = (pageContext): ReturnType<OnCreateAppSync> => {
const pinia = createPinia()
pageContext.app.use(pinia)
Object.assign(pageContext, { pinia })
Expand Down
6 changes: 3 additions & 3 deletions packages/vike-vue-pinia/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand All @@ -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"
Expand Down

0 comments on commit cad30da

Please sign in to comment.