-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathhistoire.config.ts
46 lines (45 loc) · 1.05 KB
/
histoire.config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
import { defineConfig, defaultColors } from 'histoire';
import { HstVue } from '@histoire/plugin-vue';
import { HstNuxt } from '@histoire/plugin-nuxt';
export default defineConfig({
setupFile: './histoire.setup.ts',
routerMode: 'hash',
plugins: [
HstVue(),
HstNuxt()
],
vite: {
server: {
port: 6006
}
},
theme: {
logoHref: '/',
favicon: './favicon.ico',
colors: {
gray: defaultColors.stone,
primary: defaultColors.gray
}
},
tree: {
file: ({ title, path }) => {
if (path.includes('tokens')) {
return title.split('/');
} else {
const fileName = path.substring(path.lastIndexOf('/') + 1);
return path.replace('stories/', '').replace(fileName, title).split('/');
}
},
groups: [
{
id: 'top',
title: '',
include: file => file.path.includes('DesignSystem')
},
{
title: 'Components',
include: file => !file.path.includes('DesignSystem')
}
]
}
});