From fb512c8ca55e1a22715aaf2731eedfc9c6cf4bb0 Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Sat, 14 Oct 2023 23:02:57 +0800 Subject: [PATCH] chore: use workspace feature for example (#79) * chore: use workspace feature for example Fixes #75 * replace types import --- README.md | 2 +- examples/vite/.storybook/main.ts | 2 +- examples/vite/package.json | 1 + examples/vite/src/tests/explicit-types.stories.vue | 2 +- pnpm-lock.yaml | 3 +++ 5 files changed, 7 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index d551fd50..b9c6d8d2 100644 --- a/README.md +++ b/README.md @@ -260,7 +260,7 @@ Commands: - `dev`: Build in watch mode. - `lint`: Check for eslint and prettier issues. - `test`: Run the tests. -- `example:vite`: Open the example storybook (using vite). +- `example:vite`: Open the example storybook (using vite). You need to run `build` or `dev` first. - `play`: Run the playground (currently not used). - `release`: Release a new version to npm. diff --git a/examples/vite/.storybook/main.ts b/examples/vite/.storybook/main.ts index e86bec88..ffa2f6b3 100644 --- a/examples/vite/.storybook/main.ts +++ b/examples/vite/.storybook/main.ts @@ -5,7 +5,7 @@ export default { '@storybook/addon-links', '@storybook/addon-essentials', '@storybook/addon-interactions', - '../../../src/storybook.ts', + 'storybook-vue-addon', ], framework: { name: '@storybook/vue3-vite', diff --git a/examples/vite/package.json b/examples/vite/package.json index b67e8c39..901a5938 100644 --- a/examples/vite/package.json +++ b/examples/vite/package.json @@ -18,6 +18,7 @@ "@storybook/addon-actions": "^7.4.6", "@storybook/addon-essentials": "^7.4.6", "@storybook/addon-interactions": "^7.4.6", + "storybook-vue-addon": "workspace:*", "@storybook/addon-links": "^7.4.6", "@storybook/jest": "^0.2.3", "@storybook/testing-library": "0.2.2", diff --git a/examples/vite/src/tests/explicit-types.stories.vue b/examples/vite/src/tests/explicit-types.stories.vue index f19bd2d8..92acdb89 100644 --- a/examples/vite/src/tests/explicit-types.stories.vue +++ b/examples/vite/src/tests/explicit-types.stories.vue @@ -1,6 +1,6 @@