gitbutler/packages/ui/.storybook/main.ts

22 lines
659 B
TypeScript
Raw Normal View History

import { dirname, join } from 'path';
2024-06-20 15:00:00 +03:00
import type { StorybookConfig } from '@storybook/sveltekit';
const config: StorybookConfig = {
2024-07-31 14:08:48 +03:00
stories: ['../src/stories/**/*.mdx', '../src/stories/**/*.stories.@(js|jsx|mjs|ts|tsx|svelte)'],
2024-06-20 15:00:00 +03:00
addons: [
getAbsolutePath('@storybook/addon-links'),
getAbsolutePath('@storybook/addon-essentials'),
getAbsolutePath('storybook-dark-mode'),
getAbsolutePath('@storybook/experimental-addon-test')
],
2024-06-20 15:00:00 +03:00
framework: {
name: getAbsolutePath('@storybook/sveltekit'),
2024-06-20 15:00:00 +03:00
options: {}
}
};
export default config;
function getAbsolutePath(value: string): any {
return dirname(require.resolve(join(value, 'package.json')));
}