Skip to content

Commit

Permalink
fix: rename vike-pinia to vike-vue-pinia
Browse files Browse the repository at this point in the history
BREAKING CHANGE: all references to `vike-pinia` should be replaced with `vike-vue-pinia`
b3c0c
  • Loading branch information
pdanpdan committed Jun 3, 2024
1 parent b3c0cb2 commit 222b1fd
Show file tree
Hide file tree
Showing 30 changed files with 54 additions and 54 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[<img src="https://vike.dev/vike-readme.svg" align="right" height="90">](https://vike.dev)

# `vike-{vue,pinia,vue-query}`
# `vike-{vue,vue-pinia,vue-query}`

[Vike extensions](https://vike.dev/extensions) for Vue:
- [`vike-vue`](packages/vike-vue/)
- [Changelog](packages/vike-vue/CHANGELOG.md)
- [`vike-pinia`](packages/vike-pinia/)
- [Changelog](packages/vike-pinia/CHANGELOG.md)
- [`vike-vue-pinia`](packages/vike-vue-pinia/)
- [Changelog](packages/vike-vue-pinia/CHANGELOG.md)
- [`vike-vue-query`](packages/vike-vue-query/)
- [Changelog](packages/vike-vue-query/CHANGELOG.md)
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"@vitejs/plugin-vue": "^5.0.4",
"pinia": "^2.1.7",
"vike": "^0.4.172",
"vike-pinia": "^0.0.4",
"vike-vue-pinia": "^0.0.4",
"vike-vue": "^0.6.8",
"vite": "^5.2.9",
"vue": "^3.4.23"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ import type { Config } from 'vike/types'
import Layout from '../layouts/LayoutDefault.vue'
import Head from '../layouts/HeadDefault.vue'
import vikeVue from 'vike-vue/config'
import vikePinia from 'vike-pinia/config'
import vikeVuePinia from 'vike-vue-pinia/config'

// Default configs (can be overridden by pages)
export default {
Layout,
Head,
// <title>
title: 'My Vike + Vue + Pinia App',
extends: [vikeVue, vikePinia],
extends: [vikeVue, vikeVuePinia],
} satisfies Config
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions examples/pinia/readme.md → examples/vue-pinia/readme.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Example of using [Pinia](https://pinia.vuejs.org/) with the `vike-pinia` extension.
Example of using [Pinia](https://pinia.vuejs.org/) with the `vike-vue-pinia` extension.

```bash
git clone git@github.com:vikejs/vike-vue
cd vike-vue/
pnpm install
cd examples/pinia/
cd examples/vue-pinia/
pnpm run dev
```
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"pnpm": {
"overrides": {
"vike-vue": "link:./packages/vike-vue/",
"vike-pinia": "link:./packages/vike-pinia/",
"vike-vue-pinia": "link:./packages/vike-vue-pinia/",
"vike-vue-query": "link:./packages/vike-vue-query/"
}
},
Expand Down
19 changes: 0 additions & 19 deletions packages/vike-pinia/renderer/+config.ts

This file was deleted.

File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<!-- WARNING: keep links absolute in this file so they work on NPM too -->

[<img src="https://vike.dev/vike-readme.svg" align="right" height="90">](https://vike.dev)
[![npm version](https://img.shields.io/npm/v/vike-pinia)](https://www.npmjs.com/package/vike-pinia)
[![npm version](https://img.shields.io/npm/v/vike-vue-pinia)](https://www.npmjs.com/package/vike-vue-pinia)

# `vike-pinia`
# `vike-vue-pinia`

Pinia integration for Vike, see [vike.dev/pinia](https://vike.dev/pinia).

- [Documentation](https://vike.dev)
- [Example](https://github.com/vikejs/vike-vue/tree/main/examples/pinia)
- [Changelog](https://github.com/vikejs/vike-vue/blob/main/packages/vike-pinia/CHANGELOG.md)
- [Changelog](https://github.com/vikejs/vike-vue/blob/main/packages/vike-vue-pinia/CHANGELOG.md)
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "vike-pinia",
"name": "vike-vue-pinia",
"version": "0.0.4",
"description": "",
"main": "./dist/+config.js",
Expand Down
19 changes: 19 additions & 0 deletions packages/vike-vue-pinia/renderer/+config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import type { Pinia, StateTree } from 'pinia'

export default {
name: 'vike-vue-pinia',
onCreateApp: 'import:vike-vue-pinia/renderer/installPinia:installPinia',
onAfterRenderSSRApp: 'import:vike-vue-pinia/renderer/dehydratePinia:dehydratePinia',
onBeforeMountApp: 'import:vike-vue-pinia/renderer/hydratePinia:hydratePinia',
}

declare global {
namespace Vike {
interface PageContext {
pinia?: Pinia
fromHtmlRenderer: {
piniaInitialState?: StateTree
}
}
}
}
File renamed without changes.
44 changes: 22 additions & 22 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 222b1fd

Please sign in to comment.