From 547d0184dbf41e4b42ffb13f6db2dac0fd85f70a Mon Sep 17 00:00:00 2001 From: Tristan Watanabe Date: Fri, 4 Nov 2022 11:40:08 -0400 Subject: [PATCH] chore(react-storybook, react-storybook-addon): migrate to new package structure (#25482) --- packages/react-components/react-storybook-addon/.npmignore | 5 +++-- .../react-storybook-addon/.storybook/main.js | 2 +- .../react-storybook-addon/.storybook/tsconfig.json | 2 +- .../react-storybook-addon/{src => stories}/index.stories.tsx | 0 packages/react-components/react-storybook/.npmignore | 5 +++-- 5 files changed, 8 insertions(+), 6 deletions(-) rename packages/react-components/react-storybook-addon/{src => stories}/index.stories.tsx (100%) diff --git a/packages/react-components/react-storybook-addon/.npmignore b/packages/react-components/react-storybook-addon/.npmignore index 52d2a7273a151..f7ce568a6dbf7 100644 --- a/packages/react-components/react-storybook-addon/.npmignore +++ b/packages/react-components/react-storybook-addon/.npmignore @@ -3,10 +3,11 @@ bundle-size/ config/ coverage/ -e2e/ +docs/ etc/ node_modules/ src/ +stories/ dist/types/ temp/ __fixtures__ @@ -16,7 +17,7 @@ __tests__ *.api.json *.log *.spec.* -*.stories.* +*.cy.* *.test.* *.yml diff --git a/packages/react-components/react-storybook-addon/.storybook/main.js b/packages/react-components/react-storybook-addon/.storybook/main.js index f57cfd09509e7..26536b61b387f 100644 --- a/packages/react-components/react-storybook-addon/.storybook/main.js +++ b/packages/react-components/react-storybook-addon/.storybook/main.js @@ -2,7 +2,7 @@ const rootMain = require('../../../../.storybook/main'); module.exports = /** @type {Omit} */ ({ ...rootMain, - stories: [...rootMain.stories, '../src/**/*.stories.mdx', '../src/**/index.stories.@(ts|tsx)'], + stories: [...rootMain.stories, '../stories/**/*.stories.mdx', '../stories/**/index.stories.@(ts|tsx)'], addons: [...rootMain.addons], webpackFinal: (config, options) => { const localConfig = { ...rootMain.webpackFinal(config, options) }; diff --git a/packages/react-components/react-storybook-addon/.storybook/tsconfig.json b/packages/react-components/react-storybook-addon/.storybook/tsconfig.json index f9f60e1234ed4..ea89218a3d916 100644 --- a/packages/react-components/react-storybook-addon/.storybook/tsconfig.json +++ b/packages/react-components/react-storybook-addon/.storybook/tsconfig.json @@ -6,5 +6,5 @@ "checkJs": true, "types": ["static-assets", "environment", "storybook__addons"] }, - "include": ["../src/**/*.stories.ts", "../src/**/*.stories.tsx", "*.js"] + "include": ["../stories/**/*.stories.ts", "../stories/**/*.stories.tsx", "*.js"] } diff --git a/packages/react-components/react-storybook-addon/src/index.stories.tsx b/packages/react-components/react-storybook-addon/stories/index.stories.tsx similarity index 100% rename from packages/react-components/react-storybook-addon/src/index.stories.tsx rename to packages/react-components/react-storybook-addon/stories/index.stories.tsx diff --git a/packages/react-components/react-storybook/.npmignore b/packages/react-components/react-storybook/.npmignore index 52d2a7273a151..f7ce568a6dbf7 100644 --- a/packages/react-components/react-storybook/.npmignore +++ b/packages/react-components/react-storybook/.npmignore @@ -3,10 +3,11 @@ bundle-size/ config/ coverage/ -e2e/ +docs/ etc/ node_modules/ src/ +stories/ dist/types/ temp/ __fixtures__ @@ -16,7 +17,7 @@ __tests__ *.api.json *.log *.spec.* -*.stories.* +*.cy.* *.test.* *.yml