Skip to content
Permalink
Browse files

Migrate storybook 4.x to 5.0

  • Loading branch information...
kzhrk committed Mar 6, 2019
1 parent 61c5a44 commit 26e0974708cef41d56627e95a3ea4a432effa4cc
Showing with 2,403 additions and 1,383 deletions.
  1. +7 −1 .storybook/config.js
  2. +7 −7 .storybook/webpack.config.js
  3. +7 −6 docs/iframe.html
  4. +6 −3 docs/index.html
  5. +1 −0 docs/main.076af6512e4deac3a5be.bundle.js
  6. +2 −0 docs/main.4982aebb58dfc702d6f6.bundle.js
  7. +1 −0 docs/main.4982aebb58dfc702d6f6.bundle.js.map
  8. +2 −0 docs/runtime~main.4982aebb58dfc702d6f6.bundle.js
  9. +1 −0 docs/runtime~main.4982aebb58dfc702d6f6.bundle.js.map
  10. +1 −2 ...atic/runtime~iframe.36305751f78a2d599ec4.bundle.js → runtime~main.bf7f1bbd18bd2f1ec8df.bundle.js}
  11. +1 −0 docs/sb_dll/storybook_ui-manifest.json
  12. +86 −0 docs/sb_dll/storybook_ui_dll.LICENCE
  13. +2 −0 docs/sb_dll/storybook_ui_dll.js
  14. +0 −2 docs/static/iframe.f8c77163822bcb0f5c3e.bundle.js
  15. +0 −1 docs/static/iframe.f8c77163822bcb0f5c3e.bundle.js.map
  16. +0 −100 docs/static/manager.712d1089184d82c067d9.bundle.js
  17. +0 −1 docs/static/manager.712d1089184d82c067d9.bundle.js.map
  18. +0 −1 docs/static/runtime~iframe.36305751f78a2d599ec4.bundle.js.map
  19. +0 −2 docs/static/runtime~manager.9ffd8dd7b8642e4235e2.bundle.js
  20. +0 −1 docs/static/runtime~manager.9ffd8dd7b8642e4235e2.bundle.js.map
  21. +0 −25 docs/static/vendors~iframe.1a989e4bd8ebcf8a9c4f.bundle.js
  22. +0 −1 docs/static/vendors~iframe.1a989e4bd8ebcf8a9c4f.bundle.js.map
  23. +33 −0 docs/vendors~main.4982aebb58dfc702d6f6.bundle.js
  24. +1 −0 docs/vendors~main.4982aebb58dfc702d6f6.bundle.js.map
  25. +87 −0 docs/vendors~main.aacc967d13816c803268.bundle.js
  26. +4 −4 package.json
  27. +1 −1 stories/component/list/index.js
  28. +2 −2 stories/component/sectionhead/index.js
  29. +2,151 −1,223 yarn.lock
@@ -1,9 +1,15 @@
import { configure, addDecorator } from '@storybook/html';
import { configure, addDecorator, addParameters } from '@storybook/html';
import { withNotes } from '@storybook/addon-notes';

function loadStories () {
require('../stories');
}

addParameters({
options: {
hierarchyRootSeparator: '|',
hierarchySeparator: /\/|\./,
},
});
addDecorator(withNotes);
configure(loadStories, module);
@@ -1,12 +1,12 @@
const path = require('path');

module.exports = (storybookBaseConfig, configType) => {
module.exports = ({config, mode}) => {

storybookBaseConfig.resolve = {
config.resolve = {
extensions: ['.js', '.scss', '.pug', '.md']
};

storybookBaseConfig.module.rules.push({
config.module.rules.push({
test: /\.scss$/,
exclude: /node_modules/,
use: [
@@ -16,7 +16,7 @@ module.exports = (storybookBaseConfig, configType) => {
]
});

storybookBaseConfig.module.rules.push({
config.module.rules.push({
test: /\.pug$/,
exclude: /node_modules/,
loader: 'pug-loader',
@@ -25,9 +25,9 @@ module.exports = (storybookBaseConfig, configType) => {
}
});

// storybookBaseConfig.entry.main = './src/js/index.js';
// storybookBaseConfig.output.path = path.resolve(__dirname, './public/js');
// config.entry.main = './src/js/index.js';
// config.output.path = path.resolve(__dirname, './public/js');

// Return the altered config
return storybookBaseConfig;
return config;
};
@@ -1,7 +1,7 @@
<!doctype html><html><head><meta charset="utf-8"><title>Storybook</title><base target="_parent"><style>:not(.sb-show-main) > .sb-main,
<!doctype html><html><head><meta charset="utf-8"><title>Storybook</title><meta name="viewport" content="width=device-width,initial-scale=1"><base target="_parent"><style>:not(.sb-show-main) > .sb-main,
:not(.sb-show-nopreview) > .sb-nopreview,
:not(.sb-show-errordisplay) > .sb-errordisplay {
display: none;
display: none;
}
.sb-wrapper {
@@ -48,13 +48,14 @@
font-size: 14px;
width: 100vw;
overflow: auto;
}</style><script>try {
}</style><script>/* globals window */
/* eslint-disable no-underscore-dangle */
try {
if (window.parent !== window) {
window.__REACT_DEVTOOLS_GLOBAL_HOOK__ = window.parent.__REACT_DEVTOOLS_GLOBAL_HOOK__;
window.__VUE_DEVTOOLS_GLOBAL_HOOK__ = window.parent.__VUE_DEVTOOLS_GLOBAL_HOOK__;
}
} catch (e) {
// eslint-disable-next-line no-console
console.warn('unable to connect to parent frame for connecting dev tools');
}</script></head><body><div class="sb-nopreview sb-wrapper"><div class="sb-nopreview_main"><h1 class="sb-nopreview_heading sb-heading">No Preview</h1><p>Sorry, but you either have no stories or none are selected somehow.</p><ul><li>Please check the storybook config.</li><li>Try reloading the page.</li></ul></div></div><div class="sb-errordisplay sb-wrapper"><div id="error-message" class="sb-heading"></div><pre class="sb-errordisplay_code">
<code id="error-stack"></code>
</pre></div><div id="root"></div><script src="static/runtime~iframe.36305751f78a2d599ec4.bundle.js"></script><script src="static/vendors~iframe.1a989e4bd8ebcf8a9c4f.bundle.js"></script><script src="static/iframe.f8c77163822bcb0f5c3e.bundle.js"></script></body></html>
}</script></head><body><div class="sb-nopreview sb-wrapper"><div class="sb-nopreview_main"><h1 class="sb-nopreview_heading sb-heading">No Preview</h1><p>Sorry, but you either have no stories or none are selected somehow.</p><ul><li>Please check the Storybook config.</li><li>Try reloading the page.</li></ul><p>If the problem persists, check the browser console, or the terminal you've run Storybook from.</p></div></div><div class="sb-errordisplay sb-wrapper"><div id="error-message" class="sb-heading"></div><pre class="sb-errordisplay_code"><code id="error-stack"></code></pre></div><div id="root"></div><script src="runtime~main.4982aebb58dfc702d6f6.bundle.js"></script><script src="vendors~main.4982aebb58dfc702d6f6.bundle.js"></script><script src="main.4982aebb58dfc702d6f6.bundle.js"></script></body></html>
@@ -1,14 +1,17 @@
<!doctype html><html><head><meta charset="utf-8"><title>Storybook</title><style>html, body {
<!doctype html><html><head><meta charset="utf-8"><title>Storybook</title><meta name="viewport" content="width=device-width,initial-scale=1"><style>html, body {
overflow: hidden;
height: 100%;
width: 100%;
margin: 0;
padding: 0;
}</style><script>try {
}</style><script>/* globals window */
/* eslint-disable no-underscore-dangle */
try {
if (window.parent !== window) {
window.__REACT_DEVTOOLS_GLOBAL_HOOK__ = window.parent.__REACT_DEVTOOLS_GLOBAL_HOOK__;
window.__VUE_DEVTOOLS_GLOBAL_HOOK__ = window.parent.__VUE_DEVTOOLS_GLOBAL_HOOK__;
}
} catch (e) {
// eslint-disable-next-line no-console
console.warn('unable to connect to parent frame for connecting dev tools');
}</script></head><body><div id="root"></div><script src="static/runtime~manager.9ffd8dd7b8642e4235e2.bundle.js"></script><script src="static/manager.712d1089184d82c067d9.bundle.js"></script></body></html>
}</script></head><body><div id="root"></div><script src="runtime~main.bf7f1bbd18bd2f1ec8df.bundle.js"></script><script src="vendors~main.aacc967d13816c803268.bundle.js"></script><script src="main.076af6512e4deac3a5be.bundle.js"></script></body></html>

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
Oops, something went wrong.

0 comments on commit 26e0974

Please sign in to comment.
You can’t perform that action at this time.