Add StorySource addon

This commit is contained in:
igor-dv 2018-04-23 14:22:43 +03:00
parent bc130ff2d3
commit 46da4e3248
4 changed files with 31 additions and 17 deletions

View File

@ -1,19 +1,19 @@
## Addon / Framework Support Table
| |[React](app/react)|[React Native](app/react-native)|[Vue](app/vue)|[Angular](app/angular)| [Polymer](app/polymer)| [Mithril](app/mithril)|
| ----------- |:-------:|:-------:|:-------:|:-------:|:-------:|:-------:|
|[a11y](addons/a11y) |+| | | | | |
|[actions](addons/actions) |+|+|+|+|+|+|
|[background](addons/background) |+| | | | |+|
|[centered](addons/centered) |+| |+| | |+|
|[events](addons/events) |+| | | | | |
|[graphql](addons/graphql) |+| | | | | |
|[info](addons/info) |+| | | | | |
|[jest](addons/jest) |+| | | | | |
|[knobs](addons/knobs) |+|+|+|+|+|+|
|[links](addons/links) |+|+|+|+|+|+|
|[notes](addons/notes) |+| |+|+|+|+|
|[options](addons/options) |+|+|+|+|+|+|
|[storyshots](addons/storyshots) |+|+|+|+| | |
|[storysource](addons/storysource)|+| |+|+|+|+|
|[viewport](addons/viewport) |+| |+|+|+|+|
| |[React](app/react)|[React Native](app/react-native)|[Vue](app/vue)|[Angular](app/angular)| [Polymer](app/polymer)| [Mithril](app/mithril)| [Mithril](app/html)|
| ----------- |:-------:|:-------:|:-------:|:-------:|:-------:|:-------:|:-------:|
|[a11y](addons/a11y) |+| | | | | | |
|[actions](addons/actions) |+|+|+|+|+|+|+|
|[background](addons/background) |+| | | | |+| |
|[centered](addons/centered) |+| |+| | |+| |
|[events](addons/events) |+| | | | | | |
|[graphql](addons/graphql) |+| | | | | | |
|[info](addons/info) |+| | | | | | |
|[jest](addons/jest) |+| | | | | | |
|[knobs](addons/knobs) |+|+|+|+|+|+| |
|[links](addons/links) |+|+|+|+|+|+|+|
|[notes](addons/notes) |+| |+|+|+|+| |
|[options](addons/options) |+|+|+|+|+|+| |
|[storyshots](addons/storyshots) |+|+|+|+| | | |
|[storysource](addons/storysource)|+| |+|+|+|+|+|
|[viewport](addons/viewport) |+| |+|+|+|+| |

View File

@ -1,2 +1,3 @@
import '@storybook/addon-storysource/register';
import '@storybook/addon-actions/register';
import '@storybook/addon-links/register';

View File

@ -0,0 +1,12 @@
const path = require('path');
module.exports = (storybookBaseConfig, configType, defaultConfig) => {
defaultConfig.module.rules.push({
test: [/\.stories\.js$/, /index\.js$/],
loaders: [require.resolve('@storybook/addon-storysource/loader')],
include: [path.resolve(__dirname, '../stories')],
enforce: 'pre',
});
return defaultConfig;
};

View File

@ -15,6 +15,7 @@
"devDependencies": {
"@storybook/addon-actions": "^4.0.0-alpha.3",
"@storybook/addon-links": "^4.0.0-alpha.3",
"@storybook/addon-storysource": "^4.0.0-alpha.3",
"@storybook/html": "^4.0.0-alpha.3",
"babel-core": "^6.26.0",
"babel-runtime": "^6.26.0",