From 8e8867cf8811690f965773fb60890cd7e3c4d7cf Mon Sep 17 00:00:00 2001 From: Alessandra Davila Date: Mon, 14 Dec 2020 13:57:33 -0600 Subject: [PATCH] Storybook config 2 (#7438) * feat(storybook-config): move remaining packages to storybook config * feat(storybook-config): move remaining packages to storybook config Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> --- config/storybook-preset-carbon/index.js | 2 ++ config/storybook-preset-carbon/package.json | 6 +++++- packages/react/.storybook/main.js | 10 ---------- packages/react/package.json | 2 -- yarn.lock | 6 ++++-- 5 files changed, 11 insertions(+), 15 deletions(-) diff --git a/config/storybook-preset-carbon/index.js b/config/storybook-preset-carbon/index.js index 7ad8f4c56c04..982a5bf30915 100644 --- a/config/storybook-preset-carbon/index.js +++ b/config/storybook-preset-carbon/index.js @@ -13,6 +13,8 @@ module.exports = { '@storybook/addon-actions', '@storybook/addon-links', '@storybook/addon-docs', + '@storybook/addon-notes/register', + 'storybook-readme/register', // Phase 1: port over add-ons from packages/react/.storybook // Phase 2: port over webpack config for Sass diff --git a/config/storybook-preset-carbon/package.json b/config/storybook-preset-carbon/package.json index b2e176ccc4c9..d63121df90ac 100644 --- a/config/storybook-preset-carbon/package.json +++ b/config/storybook-preset-carbon/package.json @@ -22,6 +22,10 @@ "@storybook/addon-docs": "^5.3.19", "@storybook/addon-knobs": "^5.3.19", "@storybook/addon-links": "^5.3.19", - "@storybook/addon-storysource": "^5.3.19" + "@storybook/addon-notes": "^5.3.19", + "@storybook/addon-storysource": "^5.3.19", + "@storybook/addons": "^5.3.19", + "@storybook/react": "^5.3.19", + "storybook-readme": "^5.0.8" } } diff --git a/packages/react/.storybook/main.js b/packages/react/.storybook/main.js index 803d9dba75f0..0496a27eaa38 100644 --- a/packages/react/.storybook/main.js +++ b/packages/react/.storybook/main.js @@ -12,16 +12,6 @@ module.exports = { '@storybook/addon-storysource', 'storybook-preset-carbon', - - // Next batch - // Copy over to storybook-preset-carbon/index.js (addons) - // Move dependencies from react/package.json to storybook-preset-carbon/package.json - - // ... - '@storybook/addon-notes/register', - 'storybook-readme/register', - - // ... require.resolve('./addon-carbon-theme/register'), ], stories: ['../src/**/*-story.js', '../src/**/*.stories.mdx'], diff --git a/packages/react/package.json b/packages/react/package.json index b5e9d8db58f8..ca1ebbca62e2 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -72,7 +72,6 @@ "@babel/preset-react": "^7.10.0", "@carbon/test-utils": "^10.13.0", "@percy/storybook": "^3.3.1", - "@storybook/addon-notes": "^5.3.19", "@storybook/addon-storysource": "^5.3.19", "@storybook/addons": "^5.3.19", "@storybook/react": "^5.3.19", @@ -118,7 +117,6 @@ "rtlcss": "^2.4.0", "sass-loader": "^8.0.2", "storybook-preset-carbon": "^0.0.0", - "storybook-readme": "^5.0.8", "string-replace-loader": "^2.1.0", "terser-webpack-plugin": "^2.3.2", "webpack": "^4.41.5", diff --git a/yarn.lock b/yarn.lock index d461b7dd6a4c..04363001dcba 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10203,7 +10203,6 @@ __metadata: "@carbon/icons-react": ^10.22.0 "@carbon/test-utils": ^10.13.0 "@percy/storybook": ^3.3.1 - "@storybook/addon-notes": ^5.3.19 "@storybook/addon-storysource": ^5.3.19 "@storybook/addons": ^5.3.19 "@storybook/react": ^5.3.19 @@ -10259,7 +10258,6 @@ __metadata: rtlcss: ^2.4.0 sass-loader: ^8.0.2 storybook-preset-carbon: ^0.0.0 - storybook-readme: ^5.0.8 string-replace-loader: ^2.1.0 terser-webpack-plugin: ^2.3.2 use-resize-observer: ^6.0.0 @@ -31800,7 +31798,11 @@ resolve@1.1.x: "@storybook/addon-docs": ^5.3.19 "@storybook/addon-knobs": ^5.3.19 "@storybook/addon-links": ^5.3.19 + "@storybook/addon-notes": ^5.3.19 "@storybook/addon-storysource": ^5.3.19 + "@storybook/addons": ^5.3.19 + "@storybook/react": ^5.3.19 + storybook-readme: ^5.0.8 languageName: unknown linkType: soft