Skip to content

Commit

Permalink
docs: migrate storybook to v8 (#113)
Browse files Browse the repository at this point in the history
  • Loading branch information
MiroslavPetrik authored Feb 23, 2024
1 parent bea6981 commit b7a9a55
Show file tree
Hide file tree
Showing 6 changed files with 1,477 additions and 1,776 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ node_modules/
dist/
tsconfig.build.tsbuildinfo

*storybook.log
storybook-static/
# Swap the comments on the following lines if you don't wish to use zero-installs
# Documentation here: https://yarnpkg.com/features/zero-installs
Expand Down
21 changes: 9 additions & 12 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,16 @@ export default {
"@storybook/addon-links",
"@storybook/addon-essentials",
"@storybook/addon-interactions",
"@storybook/addon-mdx-gfm"
],
framework: "@storybook/react-vite",
core: {
builder: "@storybook/builder-vite",
disableTelemetry: true,
framework: {
name: "@storybook/react-vite",
options: {}
},
async viteFinal(config) {
return {
...config,
define: {
...(config.define || {}),
"process.env": {},
},
};
core: {
disableTelemetry: true
},
docs: {
autodocs: true
}
} satisfies StorybookConfig;
1 change: 0 additions & 1 deletion .storybook/preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { DevTools } from "jotai-devtools";
import React from "react";

export const parameters = {
actions: { argTypesRegex: "^on[A-Z].*" },
controls: {
matchers: {
color: /(background|color)$/i,
Expand Down
25 changes: 13 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
"typecheck": "vitest --typecheck.only",
"storybook": "storybook dev",
"sb": "yarn storybook",
"sb:up": "yarn dlx storybook@latest upgrade",
"docs": "storybook dev --docs",
"lint": "eslint --ext .tsx,.ts ./src",
"lint:fix": "yarn run lint --fix",
Expand All @@ -54,17 +55,17 @@
"@semantic-release/github": "^9.2.6",
"@semantic-release/npm": "^11.0.2",
"@semantic-release/release-notes-generator": "^12.1.0",
"@storybook/addon-actions": "7.6.16",
"@storybook/addon-docs": "7.6.16",
"@storybook/addon-essentials": "7.6.16",
"@storybook/addon-interactions": "7.6.16",
"@storybook/addon-links": "7.6.16",
"@storybook/builder-vite": "^7.6.16",
"@storybook/manager-api": "^7.6.16",
"@storybook/react": "7.6.16",
"@storybook/react-vite": "^7.6.16",
"@storybook/testing-library": "0.2.2",
"@storybook/theming": "^7.6.16",
"@storybook/addon-actions": "^8.0.0-beta.4",
"@storybook/addon-docs": "^8.0.0-beta.4",
"@storybook/addon-essentials": "^8.0.0-beta.4",
"@storybook/addon-interactions": "^8.0.0-beta.4",
"@storybook/addon-links": "^8.0.0-beta.4",
"@storybook/addon-mdx-gfm": "8.0.0-beta.4",
"@storybook/manager-api": "^8.0.0-beta.4",
"@storybook/react": "^8.0.0-beta.4",
"@storybook/react-vite": "^8.0.0-beta.4",
"@storybook/test": "^8.0.0-beta.4",
"@storybook/theming": "^8.0.0-beta.4",
"@testing-library/jest-dom": "^6.4.2",
"@testing-library/react": "^14.2.1",
"@testing-library/user-event": "^14.5.2",
Expand Down Expand Up @@ -93,7 +94,7 @@
"react": "^18.2.0",
"react-dom": "^18.2.0",
"semantic-release": "^23.0.2",
"storybook": "7.6.16",
"storybook": "^8.0.0-beta.4",
"typescript": "5.3.3",
"vite": "^5.1.3",
"vitest": "^1.3.0",
Expand Down
9 changes: 9 additions & 0 deletions vite.config.mts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import react from "@vitejs/plugin-react";
import { defineConfig } from "vitest/config";

export default defineConfig({
plugins: [react()],
define: {
"process.env": {},
},
});
Loading

0 comments on commit b7a9a55

Please sign in to comment.