mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2026-09-09 18:03:21 +00:00
AAE-40269 Add storybook v10 (#11401)
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
import { fileURLToPath } from 'node:url';
|
||||
import { dirname } from 'node:path';
|
||||
import type { StorybookConfig } from '@storybook/angular';
|
||||
import rootMain from '../../../.storybook/main';
|
||||
|
||||
const config: StorybookConfig = {
|
||||
...rootMain,
|
||||
stories: ['../**/*.stories.@(js|jsx|ts|tsx)'],
|
||||
framework: {
|
||||
name: getAbsolutePath('@storybook/angular'),
|
||||
options: {}
|
||||
},
|
||||
staticDirs: [
|
||||
{ from: '../src/lib/i18n', to: 'assets/adf-core/i18n' },
|
||||
{ from: '../src/lib/assets/images', to: 'assets/images' }
|
||||
]
|
||||
};
|
||||
|
||||
export default config;
|
||||
|
||||
function getAbsolutePath(value: string): any {
|
||||
return dirname(fileURLToPath(import.meta.resolve(`${value}/package.json`)));
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
import type { Preview } from '@storybook/angular';
|
||||
import rootPreview from '../../../.storybook/preview';
|
||||
|
||||
const preview: Preview = {
|
||||
...rootPreview,
|
||||
tags: ['autodocs']
|
||||
};
|
||||
|
||||
export default preview;
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"extends": "../../../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"emitDecoratorMetadata": true,
|
||||
"moduleResolution": "bundler"
|
||||
},
|
||||
|
||||
"exclude": ["../**/*.spec.ts" ],
|
||||
"include": ["../**/*.ts", "*.ts"]
|
||||
}
|
||||
Reference in New Issue
Block a user