Skip to content

Commit

Permalink
merge /examples/with-vue-plugin/ into /examples/basic/
Browse files Browse the repository at this point in the history
  • Loading branch information
brillout committed Apr 8, 2024
1 parent b3da5f9 commit 9a66cd6
Show file tree
Hide file tree
Showing 21 changed files with 30 additions and 329 deletions.
5 changes: 3 additions & 2 deletions examples/basic/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"scripts": {
"dev": "vite dev",
"build": "vite build",
"preview": "vite preview",
"test": "vue-tsc --noEmit"
"preview": "vite build && vite preview",
"test:sfc-types": "vue-tsc --noEmit"
},
"dependencies": {
"@vitejs/plugin-vue": "^5.0.4",
Expand All @@ -16,6 +16,7 @@
"vike-vue": "0.6.3",
"vite": "^5.1.1",
"vue": "^3.4.18",
"vue-toast-notification": "^3.1.2",
"vue-tsc": "^1.8.27"
},
"type": "module"
Expand Down
File renamed without changes.
23 changes: 23 additions & 0 deletions examples/basic/pages/index/+Page.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,26 @@ import Counter from '../../components/Counter.vue'
const components = { Counter }
export default { components }
</script>

<script lang="ts" setup>
import * as toastPlugin from 'vue-toast-notification'
import { onBeforeUnmount, onMounted } from 'vue'
onMounted(() => {
const useToast = toastPlugin.useToast()
useToast.success('I am a Vue plugin!', {
position: 'bottom',
duration: 0, // infinite
})
})
onBeforeUnmount(() => {
const useToast = toastPlugin.useToast()
useToast.clear()
})
</script>

<style>
/* see https://stackoverflow.com/questions/55206901/how-to-import-css-files-in-vue-3-child-components */
@import 'vue-toast-notification/dist/theme-sugar.css';
</style>
1 change: 1 addition & 0 deletions examples/basic/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Basic example of using `vike-vue`, showcasing:
- [markdown pages](https://vike.dev/markdown)
- [configs](https://vike.dev/config)
- [error pages](https://vike.dev/error-page)
- Installing additional [Vue plugin](https://vuejs.org/guide/reusability/plugins.html)

```bash
git clone [email protected]:vikejs/vike-vue
Expand Down
2 changes: 0 additions & 2 deletions examples/with-vue-plugin/.gitignore

This file was deleted.

36 changes: 0 additions & 36 deletions examples/with-vue-plugin/assets/logo.svg

This file was deleted.

15 changes: 0 additions & 15 deletions examples/with-vue-plugin/components/Counter.vue

This file was deleted.

25 changes: 0 additions & 25 deletions examples/with-vue-plugin/components/Link.vue

This file was deleted.

9 changes: 0 additions & 9 deletions examples/with-vue-plugin/layouts/HeadDefault.vue

This file was deleted.

61 changes: 0 additions & 61 deletions examples/with-vue-plugin/layouts/LayoutDefault.vue

This file was deleted.

21 changes: 0 additions & 21 deletions examples/with-vue-plugin/package.json

This file was deleted.

13 changes: 0 additions & 13 deletions examples/with-vue-plugin/pages/+config.ts

This file was deleted.

25 changes: 0 additions & 25 deletions examples/with-vue-plugin/pages/_error/+Page.vue

This file was deleted.

4 changes: 0 additions & 4 deletions examples/with-vue-plugin/pages/about/+Page.vue

This file was deleted.

5 changes: 0 additions & 5 deletions examples/with-vue-plugin/pages/about/+config.ts

This file was deleted.

37 changes: 0 additions & 37 deletions examples/with-vue-plugin/pages/index/+Page.vue

This file was deleted.

9 changes: 0 additions & 9 deletions examples/with-vue-plugin/readme.md

This file was deleted.

12 changes: 0 additions & 12 deletions examples/with-vue-plugin/tsconfig.json

This file was deleted.

14 changes: 0 additions & 14 deletions examples/with-vue-plugin/vite.config.ts

This file was deleted.

11 changes: 0 additions & 11 deletions examples/with-vue-plugin/vue-shim.d.ts

This file was deleted.

Loading

0 comments on commit 9a66cd6

Please sign in to comment.