mirror of
https://github.com/storybookjs/storybook.git
synced 2025-03-21 05:02:39 +08:00
# Conflicts: # examples/official-storybook/config.js # lib/cli/test/snapshots/angular-cli/package.json # lib/cli/test/snapshots/meteor/package.json # lib/cli/test/snapshots/react/package.json # lib/cli/test/snapshots/react_native/package.json # lib/cli/test/snapshots/react_native_scripts/package.json # lib/cli/test/snapshots/react_project/package.json # lib/cli/test/snapshots/react_scripts/package.json # lib/cli/test/snapshots/sfc_vue/package.json # lib/cli/test/snapshots/update_package_organisations/package.json # lib/cli/test/snapshots/vue/package.json # lib/cli/test/snapshots/webpack_react/package.json
24 lines
749 B
JavaScript
24 lines
749 B
JavaScript
/* eslint-disable import/no-extraneous-dependencies, import/no-unresolved, import/extensions */
|
|
import { configure } from '@storybook/react';
|
|
import { setOptions } from '@storybook/addon-options';
|
|
import 'react-chromatic/storybook-addon';
|
|
|
|
setOptions({
|
|
hierarchySeparator: /\/|\./,
|
|
hierarchyRootSeparator: /\|/,
|
|
});
|
|
|
|
function loadStories() {
|
|
let req;
|
|
req = require.context('../../lib/ui/src', true, /\.stories\.js$/);
|
|
req.keys().forEach(filename => req(filename));
|
|
|
|
req = require.context('../../lib/components/src', true, /\.stories\.js$/);
|
|
req.keys().forEach(filename => req(filename));
|
|
|
|
req = require.context('./stories', true, /\.stories\.js$/);
|
|
req.keys().forEach(filename => req(filename));
|
|
}
|
|
|
|
configure(loadStories, module);
|