Skip to content

Commit

Permalink
Merge pull request #20 from storybookjs/feat/upgrade-example-projects
Browse files Browse the repository at this point in the history
Migrate examples to Storybook 7
  • Loading branch information
yannbf authored Sep 19, 2023
2 parents bf96244 + d9c0b88 commit 3d68eeb
Show file tree
Hide file tree
Showing 10 changed files with 6,702 additions and 11,107 deletions.
16 changes: 6 additions & 10 deletions examples/babel/.storybook/main.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
module.exports = {
"stories": [
"../stories/**/*.stories.mdx",
"../stories/**/*.stories.@(js|jsx|ts|tsx)"
],
"addons": [
"@storybook/addon-essentials",
"@storybook/addon-interactions",
"@storybook/addon-coverage",
],
"stories": ["../stories/**/*.mdx", "../stories/**/*.stories.@(js|jsx|ts|tsx)"],
"addons": ["@storybook/addon-essentials", "@storybook/addon-interactions", "@storybook/addon-coverage"],
"framework": {
"name": "@storybook/react-webpack5",
"options": {}
},
docs: {
autodocs: true
}
}
};
5 changes: 4 additions & 1 deletion examples/babel/.storybook/preview.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
console.log(globalThis.__coverage__)
export const decorators = [(StoryFn) => {
console.log(globalThis.__coverage__)
return StoryFn()
}]

export const parameters = {
actions: { argTypesRegex: "^on[A-Z].*" },
Expand Down
14 changes: 7 additions & 7 deletions examples/babel/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@
"webpack-dev-server": "latest"
},
"devDependencies": {
"@storybook/addon-essentials": "^7.0.0-alpha.34",
"@storybook/addon-interactions": "^7.0.0-alpha.34",
"@storybook/addon-essentials": "^7.4.2",
"@storybook/addon-interactions": "^7.4.2",
"@storybook/addon-coverage": "link:../..",
"@storybook/test-runner": "^0.7.2",
"@storybook/react": "^7.0.0-alpha.34",
"@storybook/react-webpack5": "^7.0.0-alpha.34",
"@storybook/testing-library": "^0.0.13",
"storybook": "^7.0.0-alpha.34"
"@storybook/test-runner": "^0.13.0",
"@storybook/react": "^7.4.2",
"@storybook/react-webpack5": "^7.4.2",
"@storybook/testing-library": "^0.2.1",
"storybook": "^7.4.2"
}
}
8,435 changes: 3,323 additions & 5,112 deletions examples/babel/yarn.lock

Large diffs are not rendered by default.

15 changes: 0 additions & 15 deletions examples/vite/.storybook/main.cjs

This file was deleted.

15 changes: 15 additions & 0 deletions examples/vite/.storybook/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
module.exports = {
stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|ts|tsx)"],
addons: [
"@storybook/addon-essentials",
"@storybook/addon-interactions",
"@storybook/addon-coverage",
],
framework: {
name: "@storybook/react-vite",
options: {},
},
docs: {
autodocs: true,
},
};
3 changes: 0 additions & 3 deletions examples/vite/.storybook/preview-head.html

This file was deleted.

5 changes: 4 additions & 1 deletion examples/vite/.storybook/preview.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
console.log(globalThis.__coverage__)
export const decorators = [(StoryFn) => {
console.log(globalThis.__coverage__)
return StoryFn()
}]

export const parameters = {
actions: { argTypesRegex: "^on[A-Z].*" },
Expand Down
16 changes: 8 additions & 8 deletions examples/vite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,18 @@
"react-dom": "^18.2.0"
},
"devDependencies": {
"@storybook/addon-essentials": "^7.0.0-alpha.34",
"@storybook/addon-interactions": "^7.0.0-alpha.34",
"@storybook/addon-essentials": "7.4.2",
"@storybook/addon-interactions": "7.4.2",
"@storybook/addon-coverage": "link:../..",
"@storybook/react": "^7.0.0-alpha.34",
"@storybook/react-vite": "^7.0.0-alpha.34",
"@storybook/test-runner": "^0.7.2",
"@storybook/testing-library": "^0.0.13",
"@storybook/react": "7.4.2",
"@storybook/react-vite": "7.4.2",
"@storybook/test-runner": "^0.13.0",
"@storybook/testing-library": "^0.2.1",
"@types/react": "^18.0.17",
"@types/react-dom": "^18.0.6",
"@vitejs/plugin-react": "^2.1.0",
"storybook": "^7.0.0-alpha.34",
"storybook": "7.4.2",
"typescript": "^4.6.4",
"vite": "^3.1.0"
"vite": "^4.2.1"
}
}
Loading

0 comments on commit 3d68eeb

Please sign in to comment.