2024-08-02 12:39:27 +03:00
|
|
|
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: [
|
2024-08-02 12:39:27 +03:00
|
|
|
getAbsolutePath('@storybook/addon-links'),
|
|
|
|
getAbsolutePath('@storybook/addon-essentials'),
|
|
|
|
getAbsolutePath('storybook-dark-mode')
|
2024-06-20 15:00:00 +03:00
|
|
|
],
|
|
|
|
framework: {
|
2024-08-02 12:39:27 +03:00
|
|
|
name: getAbsolutePath('@storybook/sveltekit'),
|
2024-06-20 15:00:00 +03:00
|
|
|
options: {}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
export default config;
|
2024-08-02 12:39:27 +03:00
|
|
|
|
|
|
|
function getAbsolutePath(value: string): any {
|
|
|
|
return dirname(require.resolve(join(value, 'package.json')));
|
|
|
|
}
|