This repository has been archived by the owner on Dec 22, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathstyleguide.config.js
100 lines (90 loc) · 2.69 KB
/
styleguide.config.js
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
// Only until https://github.com/styled-components/styled-components/issues/945#issuecomment-340166853 would be merged
const path = require('path');
const defaultResolver = require("react-docgen").resolver.findAllExportedComponentDefinitions;
const annotationResolver = require("react-docgen-annotation-resolver").default;
module.exports = {
title: 'Bemto-components 🍱',
showCode: true,
sections: [
{ name: 'Introduction', content: './docs/0_introduction.md' },
{ name: 'Installation', content: './docs/1_installation.md' },
{
name: 'Features',
_content: './docs/2_0_features.md',
sections: [
{
name: 'HTML Structure',
content: './docs/2_1_0_html.md',
sections: [
{ name: 'TagString', content: './docs/2_1_1_tagstring.md' },
{ name: 'Context awareness', content: './docs/2_1_2_context.md' },
{ name: 'Prop polymorphism', content: './docs/2_1_3_attributes.md' },
{ name: 'Structure', content: './docs/2_1_4_structure.md' },
{ name: 'Root tag redefine', content: './docs/2_1_5_is.md' }
]
},
{
name: 'BEM',
content: './docs/2_2_0_bem.md',
sections: [
{ name: 'Elements', content: './docs/2_2_1_elements.md' },
{ name: 'Modifiers', content: './docs/2_2_2_modifiers.md' }
]
},
{
name: 'Styled-Components',
content: './docs/2_3_0_styled.md',
sections: [
{
name: 'Extending',
content: './docs/2_3_1_extending.md'
}
]
}
]
},
{
name: 'Advanced features',
content: './docs/2_4_advanced.md',
},
{
name: 'Components',
content: './docs/3_components.md',
components: './node_modules/bemto-*/lib/**/index.js'
},
{
name: 'Meta',
sections: [
{
name: 'Changelog',
content: './Changelog.md'
}
]
}
],
styles: {
SectionHeading: {
root: {
marginBottom: '-24px'
},
heading: {
display: 'none'
}
}
},
context: {
styled: path.resolve(__dirname, 'docs/styled-default.js'),
bemto: path.resolve(__dirname, 'lib/index.js')
},
compilerConfig: {
objectAssign: 'Object.assign',
transforms: { dangerousTaggedTemplateString: true }
},
template: './docs/styleguidist-template.html',
serverPort: 6061,
resolver: (ast, recast) => {
const annotatedComponents = annotationResolver(ast, recast);
const defaultComponents = defaultResolver(ast, recast);
return annotatedComponents.concat(defaultComponents);
}
};