From 3236f7dea86d5ea89f2f89c03b72b6ad23652b86 Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Fri, 13 Oct 2023 23:40:51 +0800 Subject: [PATCH 1/2] chore: use workspace feature for example Fixes #75 --- README.md | 2 +- examples/vite/.storybook/main.ts | 2 +- examples/vite/package.json | 1 + pnpm-lock.yaml | 3 +++ 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 2250b004..c1d3bf50 100644 --- a/README.md +++ b/README.md @@ -252,7 +252,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/pnpm-lock.yaml b/pnpm-lock.yaml index 08f2dcee..f24ed91e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -145,6 +145,9 @@ importers: storybook: specifier: 7.4.6 version: 7.4.6 + storybook-vue-addon: + specifier: workspace:* + version: link:../.. typescript: specifier: ~5.2.2 version: 5.2.2 From c51229b306d988036905896524eeedc0bb3dc9f2 Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Sat, 14 Oct 2023 22:53:43 +0800 Subject: [PATCH 2/2] replace types import --- examples/vite/src/tests/explicit-types.stories.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 @@