From 31d1952e289f532a6e1babe208841e4e1d3a7423 Mon Sep 17 00:00:00 2001 From: thyhjwb6 Date: Tue, 1 Dec 2020 14:12:59 +0000 Subject: [PATCH] feat(Storybook): Add `Story` source tab add on --- .../.storybook/main.js | 8 ++++ packages/react-component-library/package.json | 1 + yarn.lock | 42 +++++++++++++++++++ 3 files changed, 51 insertions(+) diff --git a/packages/react-component-library/.storybook/main.js b/packages/react-component-library/.storybook/main.js index d98cbdbef2..8eae502ed8 100644 --- a/packages/react-component-library/.storybook/main.js +++ b/packages/react-component-library/.storybook/main.js @@ -5,6 +5,14 @@ module.exports = { '@storybook/addon-actions', '@storybook/addon-links', '@storybook/addon-knobs', + { + name: '@storybook/addon-storysource', + options: { + loaderOptions: { + injectStoryParameters: false, + }, + }, + }, '@storybook/preset-scss', ], } diff --git a/packages/react-component-library/package.json b/packages/react-component-library/package.json index 9832df5fa4..b4146b1eab 100644 --- a/packages/react-component-library/package.json +++ b/packages/react-component-library/package.json @@ -65,6 +65,7 @@ "@storybook/addon-links": "^6.0.18", "@storybook/addon-storyshots": "^6.0.21", "@storybook/addon-storyshots-puppeteer": "^6.0.21", + "@storybook/addon-storysource": "^6.1.9", "@storybook/addons": "^6.0.18", "@storybook/preset-scss": "^1.0.2", "@storybook/react": "^6.0.18", diff --git a/yarn.lock b/yarn.lock index 80dd634959..9c0b12ce07 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3302,6 +3302,26 @@ regenerator-runtime "^0.13.7" ts-dedent "^2.0.0" +"@storybook/addon-storysource@^6.1.9": + version "6.1.9" + resolved "https://registry.yarnpkg.com/@storybook/addon-storysource/-/addon-storysource-6.1.9.tgz#9f7c50522b4de4bc90508a3882ba473bec82f435" + integrity sha512-xG3UAHRFfdn7dvoOjlvIHUNWgMPRLy87qjjHgmdW0jWyvGEtT7k10IRGgnozXp64ETy8dAnIyt3kmRUwXj/pkg== + dependencies: + "@storybook/addons" "6.1.9" + "@storybook/api" "6.1.9" + "@storybook/client-logger" "6.1.9" + "@storybook/components" "6.1.9" + "@storybook/router" "6.1.9" + "@storybook/source-loader" "6.1.9" + "@storybook/theming" "6.1.9" + core-js "^3.0.1" + estraverse "^4.2.0" + loader-utils "^2.0.0" + prettier "~2.0.5" + prop-types "^15.7.2" + react-syntax-highlighter "^13.5.0" + regenerator-runtime "^0.13.7" + "@storybook/addons@6.1.2": version "6.1.2" resolved "https://registry.yarnpkg.com/@storybook/addons/-/addons-6.1.2.tgz#e073d4d930d84cb5d54cef5bd4376724369b56de" @@ -3865,6 +3885,23 @@ core-js "^3.6.5" find-up "^4.1.0" +"@storybook/source-loader@6.1.9": + version "6.1.9" + resolved "https://registry.yarnpkg.com/@storybook/source-loader/-/source-loader-6.1.9.tgz#10eebf12ecd7baa70e51f368c41b89b4b5084eb1" + integrity sha512-2h3TS1O9qJ0xmOOJrWxY9ODEFK0/RLxEmWcXngWAcH1ZrHAuz6UcEatO2bIgykrorf9xKqqk7/AYyE9KxW668A== + dependencies: + "@storybook/addons" "6.1.9" + "@storybook/client-logger" "6.1.9" + "@storybook/csf" "0.0.1" + core-js "^3.0.1" + estraverse "^4.2.0" + global "^4.3.2" + loader-utils "^2.0.0" + lodash "^4.17.15" + prettier "~2.0.5" + regenerator-runtime "^0.13.7" + source-map "^0.7.3" + "@storybook/theming@6.1.2": version "6.1.2" resolved "https://registry.yarnpkg.com/@storybook/theming/-/theming-6.1.2.tgz#55fb60017acdf952450cc0cb9b530d36aa039178" @@ -18727,6 +18764,11 @@ prettier@^2.0.5, prettier@^2.1.2: resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.2.0.tgz#8a03c7777883b29b37fb2c4348c66a78e980418b" integrity sha512-yYerpkvseM4iKD/BXLYUkQV5aKt4tQPqaGW6EsZjzyu0r7sVZZNPJW4Y8MyKmicp6t42XUPcBVA+H6sB3gqndw== +prettier@~2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.0.5.tgz#d6d56282455243f2f92cc1716692c08aa31522d4" + integrity sha512-7PtVymN48hGcO4fGjybyBSIWDsLU4H4XlvOHfq91pz9kkGlonzwTfYkaIEwiRg/dAJF9YlbsduBAgtYLi+8cFg== + pretty-bytes@^5.1.0, pretty-bytes@^5.3.0, pretty-bytes@^5.4.1: version "5.4.1" resolved "https://registry.yarnpkg.com/pretty-bytes/-/pretty-bytes-5.4.1.tgz#cd89f79bbcef21e3d21eb0da68ffe93f803e884b"