mirror of
https://github.com/twentyhq/twenty.git
synced 2024-12-25 21:13:01 +03:00
46 lines
1.2 KiB
TypeScript
46 lines
1.2 KiB
TypeScript
|
import type { StorybookConfig } from '@storybook/react-vite';
|
||
|
|
||
|
const computeStoriesGlob = () => {
|
||
|
if (process.env.STORYBOOK_SCOPE === 'pages') {
|
||
|
return [
|
||
|
'../src/pages/**/*.stories.@(js|jsx|ts|tsx)',
|
||
|
'../src/__stories__/*.stories.@(js|jsx|ts|tsx)',
|
||
|
'../src/pages/**/*.docs.mdx',
|
||
|
'../src/__stories__/*.docs.mdx'
|
||
|
]
|
||
|
}
|
||
|
|
||
|
if (process.env.STORYBOOK_SCOPE === 'modules') {
|
||
|
return ['../src/modules/**/*.stories.@(js|jsx|ts|tsx)', '../src/modules/**/*.docs.mdx']
|
||
|
}
|
||
|
|
||
|
if (process.env.STORYBOOK_SCOPE === 'ui-docs') {
|
||
|
return ['../src/modules/ui/**/*.docs.mdx'];
|
||
|
}
|
||
|
|
||
|
return ['../src/**/*.docs.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)']
|
||
|
};
|
||
|
|
||
|
const config: StorybookConfig = {
|
||
|
stories: computeStoriesGlob(),
|
||
|
staticDirs: ['../public'],
|
||
|
addons: [
|
||
|
'@storybook/addon-links',
|
||
|
'@storybook/addon-essentials',
|
||
|
'@storybook/addon-onboarding',
|
||
|
'@storybook/addon-interactions',
|
||
|
'@storybook/addon-coverage',
|
||
|
'@storybook/addon-themes',
|
||
|
'storybook-addon-cookie',
|
||
|
'storybook-addon-pseudo-states',
|
||
|
],
|
||
|
framework: {
|
||
|
name: '@storybook/react-vite',
|
||
|
options: {},
|
||
|
},
|
||
|
docs: {
|
||
|
autodocs: false,
|
||
|
},
|
||
|
};
|
||
|
export default config;
|