Showing example code in storybook (#10765)
Co-authored-by: Nick Taylor <nick@dev.to>
This commit is contained in:
parent
36e271e1cb
commit
9514df9ea6
3 changed files with 54 additions and 1 deletions
|
|
@ -10,6 +10,16 @@ module.exports = {
|
|||
'@storybook/addon-links',
|
||||
'@storybook/addon-a11y',
|
||||
'@storybook/addon-notes/register-panel',
|
||||
{
|
||||
name: '@storybook/addon-storysource',
|
||||
loaderOptions: {
|
||||
prettierConfig: {
|
||||
singleQuote: true,
|
||||
trailingComma: 'all',
|
||||
printWidth: 80,
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
webpackFinal: async (config, { configType }) => {
|
||||
config.module.rules.push({
|
||||
|
|
|
|||
|
|
@ -96,6 +96,7 @@
|
|||
"@storybook/addon-links": "^6.0.25",
|
||||
"@storybook/addon-notes": "^5.3.21",
|
||||
"@storybook/addon-storyshots": "^6.0.26",
|
||||
"@storybook/addon-storysource": "^6.0.26",
|
||||
"@storybook/addons": "^6.0.26",
|
||||
"@storybook/preact": "^6.0.26",
|
||||
"@testing-library/jest-dom": "^5.11.4",
|
||||
|
|
|
|||
44
yarn.lock
44
yarn.lock
|
|
@ -1849,6 +1849,27 @@
|
|||
regenerator-runtime "^0.13.3"
|
||||
ts-dedent "^1.1.1"
|
||||
|
||||
"@storybook/addon-storysource@^6.0.26":
|
||||
version "6.0.26"
|
||||
resolved "https://registry.yarnpkg.com/@storybook/addon-storysource/-/addon-storysource-6.0.26.tgz#ee099f271846b45a5a4e9ac7f4264604e65d8062"
|
||||
integrity sha512-E+RBPdkKEhfVrWaewWgM2DQnREcOCdavOsrm1ayV06tPmmZZoDQErhBE7OjXVT0AUhATEelZreIxrj7lVewjkg==
|
||||
dependencies:
|
||||
"@storybook/addons" "6.0.26"
|
||||
"@storybook/api" "6.0.26"
|
||||
"@storybook/client-logger" "6.0.26"
|
||||
"@storybook/components" "6.0.26"
|
||||
"@storybook/router" "6.0.26"
|
||||
"@storybook/source-loader" "6.0.26"
|
||||
"@storybook/theming" "6.0.26"
|
||||
core-js "^3.0.1"
|
||||
estraverse "^4.2.0"
|
||||
loader-utils "^2.0.0"
|
||||
prettier "~2.0.5"
|
||||
prop-types "^15.7.2"
|
||||
react "^16.9.17"
|
||||
react-syntax-highlighter "^12.2.1"
|
||||
regenerator-runtime "^0.13.3"
|
||||
|
||||
"@storybook/addons@5.3.21":
|
||||
version "5.3.21"
|
||||
resolved "https://registry.yarnpkg.com/@storybook/addons/-/addons-5.3.21.tgz#ee312c738c33e8c34dc11777ef93522c3c36e56a"
|
||||
|
|
@ -2453,6 +2474,22 @@
|
|||
core-js "^3.6.5"
|
||||
find-up "^4.1.0"
|
||||
|
||||
"@storybook/source-loader@6.0.26":
|
||||
version "6.0.26"
|
||||
resolved "https://registry.yarnpkg.com/@storybook/source-loader/-/source-loader-6.0.26.tgz#0c9a20b9e018c49d559c56e1bdae8350b8175371"
|
||||
integrity sha512-axNYEHEj7c9oHUFTMKZ6xRyKZCEEP7Aa9sFPzV5Q3Vrq6/3qhih5fOPXhst6/s4XZC1eIoKKHb/Gk4hmjYOEYA==
|
||||
dependencies:
|
||||
"@storybook/addons" "6.0.26"
|
||||
"@storybook/client-logger" "6.0.26"
|
||||
"@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.3"
|
||||
|
||||
"@storybook/theming@5.3.21":
|
||||
version "5.3.21"
|
||||
resolved "https://registry.yarnpkg.com/@storybook/theming/-/theming-5.3.21.tgz#ae2dc101aa57c3be4df1724ae729e11bad118e0b"
|
||||
|
|
@ -14058,6 +14095,11 @@ prettier@^2.1.2:
|
|||
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.1.2.tgz#3050700dae2e4c8b67c4c3f666cdb8af405e1ce5"
|
||||
integrity sha512-16c7K+x4qVlJg9rEbXl7HEGmQyZlG4R9AgP+oHKRMsMsuk8s+ATStlf1NpDqyBI1HpVyfjLOeMhH2LvuNvV5Vg==
|
||||
|
||||
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-error@^2.1.1:
|
||||
version "2.1.1"
|
||||
resolved "https://registry.yarnpkg.com/pretty-error/-/pretty-error-2.1.1.tgz#5f4f87c8f91e5ae3f3ba87ab4cf5e03b1a17f1a3"
|
||||
|
|
@ -14807,7 +14849,7 @@ react-transition-group@^4.3.0:
|
|||
loose-envify "^1.4.0"
|
||||
prop-types "^15.6.2"
|
||||
|
||||
react@^16.13.1, react@^16.4.0, react@^16.8.3:
|
||||
react@^16.13.1, react@^16.4.0, react@^16.8.3, react@^16.9.17:
|
||||
version "16.13.1"
|
||||
resolved "https://registry.yarnpkg.com/react/-/react-16.13.1.tgz#2e818822f1a9743122c063d6410d85c1e3afe48e"
|
||||
integrity sha512-YMZQQq32xHLX0bz5Mnibv1/LHb3Sqzngu7xstSM+vrkE5Kzr9xE0yMByK5kMoTK30YVJE61WfbxIFFvfeDKT1w==
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue