1
0
mirror of https://github.com/storybookjs/storybook.git synced 2025-03-25 05:03:10 +08:00

23 lines
620 B
TypeScript
Raw Normal View History

import { configure, addDecorator } from '@storybook/angular';
import { withOptions } from '@storybook/addon-options';
import addCssWarning from '../src/cssWarning';
addCssWarning();
addDecorator(
withOptions({
hierarchyRootSeparator: /\|/,
})
);
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);