2019-04-25 17:59:37 +02:00
|
|
|
/* eslint-disable global-require */
|
2019-04-26 18:32:52 -04:00
|
|
|
import { configure, addParameters, addDecorator } from '@storybook/angular';
|
|
|
|
import { withA11y } from '@storybook/addon-a11y';
|
2019-05-02 20:25:15 -04:00
|
|
|
import addCssWarning from '../src/cssWarning';
|
2018-01-10 10:19:36 +02:00
|
|
|
|
2019-04-26 18:32:52 -04:00
|
|
|
addDecorator(withA11y);
|
2018-01-10 10:19:36 +02:00
|
|
|
addCssWarning();
|
2017-07-14 12:21:30 -06:00
|
|
|
|
2018-12-10 19:28:40 +01:00
|
|
|
addParameters({
|
|
|
|
options: {
|
2018-11-30 23:12:51 -05:00
|
|
|
hierarchyRootSeparator: /\|/,
|
2018-12-10 19:28:40 +01:00
|
|
|
},
|
|
|
|
});
|
2018-02-05 17:24:06 +02:00
|
|
|
|
2017-07-14 12:21:30 -06:00
|
|
|
function loadStories() {
|
2017-12-24 11:58:12 +01:00
|
|
|
// put welcome screen at the top of the list so it's the first one displayed
|
2017-08-01 14:54:24 -06:00
|
|
|
require('../src/stories');
|
2017-12-24 11:58:12 +01:00
|
|
|
|
|
|
|
// automatically import all story ts files that end with *.stories.ts
|
2018-02-06 10:02:29 +02:00
|
|
|
const req = require.context('../src/stories', true, /\.stories\.ts$/);
|
2018-02-17 23:32:26 +03:00
|
|
|
req.keys().forEach(filename => req(filename));
|
2017-07-14 12:21:30 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
configure(loadStories, module);
|