-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
1,928 additions
and
3,166 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "@storybook-vue/nuxt", | ||
"version": "0.1.2", | ||
"version": "0.1.3-alpha.0", | ||
"packageManager": "[email protected]", | ||
"description": "Storybook for Nuxt and Vite: Develop Vue3 components in isolation with Hot Reloading.", | ||
"license": "MIT", | ||
|
@@ -56,37 +56,40 @@ | |
"build": "unbuild", | ||
"build:watch": "unbuild --stub", | ||
"test": "vitest run", | ||
"dev": "unbuild && cd playground && storybook dev", | ||
"dev": "unbuild && cd playground && storybook dev -p 6006", | ||
"prepack": "unbuild" | ||
}, | ||
"peerDependencies": { | ||
"nuxt": "^3.6.5", | ||
"vite": "^4.0.0", | ||
"vue": "^3.3.4" | ||
}, | ||
"dependencies": { | ||
"@nuxt/devtools-kit": "^0.7.6", | ||
"@nuxt/devtools-kit": "^0.7.4", | ||
"@nuxt/kit": "^3.6.5", | ||
"@nuxt/schema": "^3.6.5", | ||
"@nuxt/vite-builder": "^3.6.5", | ||
"@storybook/builder-vite": "latest", | ||
"@storybook/vue3": "latest", | ||
"@storybook/vue3-vite": "latest", | ||
"@storybook/builder-vite": "7.4.4", | ||
"@storybook/vue3": "7.4.4", | ||
"@storybook/vue3-vite": "7.4.4", | ||
"autoprefixer": "^10.4.15", | ||
"postcss": "^8.4.27", | ||
"postcss-import": "^15.1.0", | ||
"postcss-url": "^10.1.3", | ||
"typescript": "^5.2.2" | ||
"typescript": "^5.2.2", | ||
"vue-router": "^4.2.5" | ||
}, | ||
"devDependencies": { | ||
"@storybook/types": "latest", | ||
"@storybook/types": "7.4.4", | ||
"@vitejs/plugin-vue": "^4.2.3", | ||
"@vitejs/plugin-vue-jsx": "^3.0.1", | ||
"nuxt": "^3.6.5", | ||
"vite": "^4.0.0" | ||
"@vitejs/plugin-vue-jsx": "^3.0.1" | ||
}, | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"paths": { | ||
"#build/plugins": "./build/plugins" | ||
}, | ||
"bundler": { | ||
"entries": [ | ||
"./src/index.ts", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,6 @@ | ||
<script lang="ts" setup> | ||
</script> | ||
|
||
<template> | ||
<div> | ||
<h1> My Nuxt App</h1> | ||
<NuxtPage /> | ||
<MyNuxtPage /> | ||
</div> | ||
</template> |
This file was deleted.
Oops, something went wrong.
65 changes: 40 additions & 25 deletions
65
packages/storybook-nuxt/playground/components/MyNuxtPage.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,58 @@ | ||
<script setup lang="ts"> | ||
const route = useRoute() | ||
<script> | ||
</script> | ||
|
||
<template> | ||
<b>My Custom Storybook App </b> | ||
<p>This is custom app template to be used in Storybook to test routing.</p> | ||
<br> | ||
<p> worth clapping no ?</p> | ||
<NuxtExampleLayout repo="nuxt/examples" example="routing/pages"> | ||
<NuxtLoadingIndicator /> | ||
<v-container> | ||
<NuxtPage /> | ||
<template #footer> | ||
<div class="text-center p-4 op-50"> | ||
Current route: <code>{{ route.path }}</code> | ||
</div> | ||
</template> | ||
</v-container> | ||
<v-layout class="overflow-visible" style="height: 56px;"> | ||
<v-bottom-navigation | ||
v-model="value" | ||
active | ||
color="primary" | ||
> | ||
<v-btn> | ||
<v-icon>mdi-home</v-icon> | ||
|
||
<template #nav> | ||
<nav class="flex align-center gap-4 p-4"> | ||
<NuxtLink to="/" class="n-link-base"> | ||
Home | ||
</NuxtLink> | ||
</v-btn> | ||
<v-btn> | ||
<v-icon>mdi-history</v-icon> | ||
|
||
<NuxtLink to="/about" class="n-link-base"> | ||
About | ||
</NuxtLink> | ||
</v-btn> | ||
|
||
<v-btn> | ||
<v-icon>mdi-heart</v-icon> | ||
|
||
<NuxtLink to="/parent" class="n-link-base"> | ||
Parent (index) | ||
</NuxtLink> | ||
</v-btn> | ||
|
||
<v-btn> | ||
<v-icon>mdi-map-marker</v-icon> | ||
|
||
<NuxtLink to="/parent/b" class="n-link-base"> | ||
Parent (b) | ||
</NuxtLink> | ||
<button class="n-link-base" @click="$router.push(`/parent/reload-${(Math.random() * 100).toFixed()}`)"> | ||
Keyed child | ||
</button> | ||
<button class="n-link-base" @click="$router.push(`/parent/static-${(Math.random() * 100).toFixed()}`)"> | ||
Non-keyed child | ||
</button> | ||
</nav> | ||
</template> | ||
|
||
<template #footer> | ||
<div class="text-center p-4 op-50"> | ||
Current route: <code>{{ route.path }}</code> | ||
</div> | ||
</template> | ||
</NuxtExampleLayout> | ||
</v-btn> | ||
<v-btn class="n-link-base" @click="$router.push(`/parent/reload-${(Math.random() * 100).toFixed()}`)"> | ||
Keyed child | ||
</v-btn> | ||
<v-btn class="n-link-base" @click="$router.push(`/parent/static-${(Math.random() * 100).toFixed()}`)"> | ||
Non-keyed child | ||
</v-btn> | ||
</v-bottom-navigation> | ||
</v-layout> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 0 additions & 39 deletions
39
packages/storybook-nuxt/playground/stories/MyI18n.stories.ts
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.