2017-07-14 12:21:30 -06:00
|
|
|
import { configure } from '@storybook/angular';
|
2018-02-05 17:24:06 +02:00
|
|
|
import { setOptions } from '@storybook/addon-options';
|
2018-01-10 10:19:36 +02:00
|
|
|
import addCssWarning from '../src/cssWarning';
|
|
|
|
|
|
|
|
addCssWarning();
|
2017-07-14 12:21:30 -06:00
|
|
|
|
2018-02-05 17:24:06 +02:00
|
|
|
setOptions({
|
|
|
|
hierarchyRootSeparator: /\|/,
|
|
|
|
});
|
|
|
|
|
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
|
|
|
|
const req = require.context('../src/stories', true, /\.stories\.ts$/)
|
|
|
|
req.keys().forEach((filename) => req(filename))
|
2017-07-14 12:21:30 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
configure(loadStories, module);
|