Skip to content

Commit

Permalink
feat: update deps & example
Browse files Browse the repository at this point in the history
  • Loading branch information
cpreston321 committed Apr 4, 2023
1 parent 904266d commit 94bf04c
Show file tree
Hide file tree
Showing 7 changed files with 3,724 additions and 3,786 deletions.
2 changes: 2 additions & 0 deletions .playground/app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ const fakeArray = ref(colors)
>
{{ idx }}
</SwiperSlide>

<SwiperControls />
</Swiper>
<h2>Swiper Card Effect</h2>
<Swiper
Expand Down
8 changes: 8 additions & 0 deletions .playground/components/SwiperControls.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<script setup lang="ts">
const swiper = useSwiper()
</script>

<template>
<button @click="swiper.slideNext()">Next</button>
<button @click="swiper.slidePrev()">Previous</button>
</template>
8 changes: 0 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,6 @@ export default defineNuxtConfig({
// modules: ['navigation', 'pagination'], // all modules are imported by default
}
})

// or inline config
export default defineNuxtConfig({
modules: [['nuxt-swiper', {
// Swiper options
}]]
})
```

## Usage
Expand Down Expand Up @@ -149,7 +142,6 @@ type SwiperModulesType =
| 'hash-navigation'
| 'history'
| 'keyboard'
| 'lazy'
| 'manipulation'
| 'mousewheel'
| 'navigation'
Expand Down
3 changes: 3 additions & 0 deletions examples/swiper-basic/app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ const slides = ref(Array.from({ length: 10 }, () => {
>
{{ idx }}
</SwiperSlide>

<!-- useSwiper() within a swiper instance -->
<SwiperControls />
</Swiper>
<h2>Swiper Card Effect</h2>
<Swiper
Expand Down
8 changes: 8 additions & 0 deletions examples/swiper-basic/components/SwiperControls.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<script setup lang="ts">
const swiper = useSwiper()
</script>

<template>
<button @click="swiper.slideNext()">Next</button>
<button @click="swiper.slidePrev()">Previous</button>
</template>
20 changes: 10 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,24 +41,24 @@
"prepare": "nuxt-module-build && nuxi prepare .playground"
},
"dependencies": {
"@nuxt/kit": "^3.2.3",
"swiper": "^9.1.0"
"@nuxt/kit": "^3.3.3",
"swiper": "^9.2.0"
},
"devDependencies": {
"@nuxt/module-builder": "latest",
"@nuxt/test-utils": "^3.1.2",
"@nuxt/test-utils": "^3.3.3",
"@nuxtjs/eslint-config-typescript": "latest",
"@typescript-eslint/parser": "^5.50.0",
"eslint": "^8.29.0",
"nuxt": "^3.2.3",
"release-it": "^15.6.1",
"typescript": "^4.9.5",
"vitest": "^0.29.2"
"@typescript-eslint/parser": "^5.57.1",
"eslint": "^8.37.0",
"nuxt": "^3.3.3",
"release-it": "^15.10.1",
"typescript": "^5.0.3",
"vitest": "^0.29.8"
},
"resolutions": {
"nuxt-swiper": "link:."
},
"packageManager": "pnpm@7.28.0",
"packageManager": "pnpm@8.1.1",
"release-it": {
"git": {
"commitMessage": "chore(release): v${version}"
Expand Down
7,461 changes: 3,693 additions & 3,768 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

0 comments on commit 94bf04c

Please sign in to comment.