25 lines
689 B
TypeScript
Raw Normal View History

2019-04-25 17:59:37 +02:00
/* eslint-disable global-require */
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';
addDecorator(withA11y);
addCssWarning();
2018-12-10 19:28:40 +01:00
addParameters({
options: {
hierarchyRootSeparator: /\|/,
2018-12-10 19:28:40 +01:00
},
});
function loadStories() {
// put welcome screen at the top of the list so it's the first one displayed
require('../src/stories');
// 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));
}
configure(loadStories, module);