Skip to content

Commit

Permalink
Merge pull request #81 from storybookjs/upgrade-sb-deps
Browse files Browse the repository at this point in the history
Require Storybook v7 in v3
  • Loading branch information
JReinhold committed Dec 14, 2022
2 parents ecaf1b5 + 9c0f315 commit b1e3595
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 7 deletions.
24 changes: 21 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,24 @@ It supports:

# Getting Started

1. Add '@storybook/addon-svelte-csf' to your dev dependencies
2. In `.storybook/main.js`, add `*.stories.svelte` to the stories patterns
3. In `.storybook/main.js`, add `@storybook/addon-svelte-csf` to the addons array
1. `npm install --save-dev @storybook/addon-svelte-csf` or `yarn add --dev @storybook/addon-svelte-csf`
2. In `.storybook/main.js`, add `@storybook/addon-svelte-csf` to the addons array
3. In `.storybook/main.js`, add `*.stories.svelte` to the stories patterns

An example `main.js` configuration could look like this:

```js
module.exports = {
stories: ['../src/**/*.stories.@(js|jsx|ts|tsx|svelte)'],
addons: [
'@storybook/addon-links',
'@storybook/addon-essentials',
'@storybook/addon-interactions',
'@storybook/addon-svelte-csf',
],
framework: '@storybook/svelte-vite',
};
```

> **Warning**
> v3 and above of this addon requires at least Storybook v7. If you're using Storybook between v6.4.20 and v7.0.0, you should instead use v2 of this addon with `npm install --save-dev @storybook/addon-svelte-csf@^2.0.10` or `yarn add --dev @storybook/addon-svelte-csf@^2.0.10`
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,12 @@
"vite": "^3.1.4"
},
"peerDependencies": {
"@storybook/svelte": ">=6.4.20",
"@storybook/theming": ">=6.4.20",
"@sveltejs/vite-plugin-svelte": "^1.0.0",
"@storybook/svelte": "^7.0.0-beta",
"@storybook/theming": "^7.0.0-beta",
"@sveltejs/vite-plugin-svelte": "^1.0.0 || ^2.0.0",
"svelte": "^3.50.0",
"svelte-loader": "^3.1.2",
"vite": ">=3.0.0"
"vite": "^3.0.0 || ^4.0.0"
},
"peerDependenciesMeta": {
"@sveltejs/vite-plugin-svelte": {
Expand Down

0 comments on commit b1e3595

Please sign in to comment.