Skip to content

Commit

Permalink
Update to latest SB 7
Browse files Browse the repository at this point in the history
- Clean up `.storybook/main.js`
- Rename `Intro.stories.mdx` -> `Intro.mdx`
    - Update `stories` globs
  • Loading branch information
kylegach committed May 31, 2023
1 parent 894fe4d commit 5dc8e07
Show file tree
Hide file tree
Showing 4 changed files with 1,841 additions and 1,495 deletions.
53 changes: 29 additions & 24 deletions .storybook/main.js
Original file line number Diff line number Diff line change
@@ -1,32 +1,37 @@
module.exports = {
stories: ['../src/**/*.stories.mdx', '../src/**/*.stories.(tsx|js)'],
staticDirs: ['./static'],
addons: ['@storybook/addon-essentials', '@storybook/addon-a11y', 'storybook-addon-pseudo-states', '@storybook/addon-interactions'],
const config = {
framework: {
name: '@storybook/react-webpack5',
options: {
builder: {
fsCache: true,
},
},
},
stories: ['../src/**/*.mdx', '../src/**/*.stories.(tsx|js)'],
addons: [
'@storybook/addon-essentials',
'@storybook/addon-a11y',
'storybook-addon-pseudo-states',
'@storybook/addon-interactions',
],
docs: {
autodocs: true,
},
features: {
interactionsDebugger: true
interactionsDebugger: true,
},
core: {},
webpackFinal: async config => {
staticDirs: ['./static'],
webpackFinal: async (config) => {
config.module.rules.push({
test: /\.mjs$/,
include: /node_modules/,
type: 'javascript/auto'
type: 'javascript/auto',
});
config.resolve.alias['./useMailingListForm'] = require.resolve('../src/__mocks__/useMailingListForm.mock.js');
config.resolve.alias['./useMailingListForm'] = require.resolve(
'../src/__mocks__/useMailingListForm.mock.js'
);
return config;
},
framework: {
name: '@storybook/react-webpack5',
options: {
builder: {
fsCache: true
}
}
},
docsPage: {
docs: 'automatic'
},
docs: {
docsPage: 'automatic'
}
};
};

export default config;
30 changes: 15 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@
"@docsearch/react": "^3.1.0",
"@emotion/weak-memoize": "^0.2.5",
"@floating-ui/react-dom-interactions": "^0.6.5",
"@storybook/design-system": "^7.9.2",
"@storybook/manager-api": "^7.0.0-beta.3",
"@storybook/theming": "^7.0.0-beta.3",
"@storybook/design-system": "^7.15.10",
"@storybook/manager-api": "^7.0.18",
"@storybook/theming": "^7.0.18",
"formik": "^2.1.5",
"human-format": "^0.11.0",
"react-merge-refs": "^1.1.0"
Expand All @@ -65,25 +65,25 @@
"@babel/preset-react": "^7.10.1",
"@babel/preset-typescript": "^7.10.1",
"@emotion/babel-plugin": "^11.9.2",
"@storybook/addon-a11y": "^7.0.0-beta.3",
"@storybook/addon-actions": "^7.0.0-beta.3",
"@storybook/addon-docs": "^7.0.0-beta.3",
"@storybook/addon-essentials": "^7.0.0-beta.3",
"@storybook/addon-interactions": "^7.0.0-beta.3",
"@storybook/addon-a11y": "^7.0.18",
"@storybook/addon-actions": "^7.0.18",
"@storybook/addon-docs": "^7.0.18",
"@storybook/addon-essentials": "^7.0.18",
"@storybook/addon-interactions": "^7.0.18",
"@storybook/eslint-config-storybook": "^3.1.2",
"@storybook/jest": "^0.0.10",
"@storybook/jest": "^0.1.0",
"@storybook/linter-config": "^3.1.2",
"@storybook/react": "^7.0.0-beta.3",
"@storybook/react-webpack5": "^7.0.0-beta.3",
"@storybook/testing-library": "^0.0.14-next.0",
"@storybook/react": "^7.0.18",
"@storybook/react-webpack5": "^7.0.18",
"@storybook/testing-library": "^0.1.0",
"auto": "^10.37.4",
"babel-eslint": "^10.1.0",
"babel-loader": "^8.1.0",
"chromatic": "^5.0.0",
"cross-env": "^7.0.2",
"dotenv-cli": "^3.1.0",
"eslint": "^7.1.0",
"eslint-plugin-storybook": "^0.6.7",
"eslint-plugin-storybook": "^0.6.12",
"framer-motion": "^7.0.0",
"husky": "^4.2.5",
"lint-staged": "^10.2.9",
Expand All @@ -92,8 +92,8 @@
"react": "17",
"react-dom": "17",
"sort-package-json": "^1.51.0",
"storybook": "^7.0.0-beta.3",
"storybook-addon-pseudo-states": "^1.15.1",
"storybook": "^7.0.18",
"storybook-addon-pseudo-states": "^2.0.1",
"ts-loader": "^7.0.5",
"typescript": "^4.7.4"
},
Expand Down
2 changes: 1 addition & 1 deletion src/Intro.stories.mdx → src/Intro.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Meta } from '@storybook/addon-docs';
import { Meta } from '@storybook/blocks';
import componentsMarketing from './components-marketing.png';

<Meta title="Intro" />
Expand Down
Loading

0 comments on commit 5dc8e07

Please sign in to comment.