-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstyleguide.config.js
116 lines (115 loc) · 2.73 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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
const pkg = require("./package.json");
module.exports = {
skipComponentsWithoutExample: true,
styleguideDir: "docs", // change build folder so we can deploy to Github Pages
pagePerSection: true, // show only one section per page
version: pkg.version,
require: [
"./src/base/styles.scss" // include base styles
],
ribbon: {
url: "https://github.com/SynetoNet/compass-react",
text: "Fork me on GitHub"
},
theme: {
color: {
sidebarBackground: "#F4E8Fa"
},
sidebarWidth: 260,
fontSize: {
text: 13
}
},
sections: [
{
name: "Setup",
content: "src/Setup.md"
},
{
name: "Base",
content: "src/base/Base.md",
sectionDepth: 1,
sections: [
{
name: "Typography",
content: "src/base/Typography.md"
},
{
name: "Colors",
content: "src/base/Colors.md"
},
{
name: "Utilities",
content: "src/base/Utilities.md"
}
]
},
{
name: "Layout",
sections: [
{
name: "Layout",
content: "src/layout/Layout/Layout.md"
},
{
name: "Grid",
content: "src/layout/Grid/Grid.md",
components: "src/layout/Grid/**/*.jsx",
usageMode: "collapse"
},
{
name: "TitleBar",
content: "src/layout/TitleBar/TitleBar.md"
},
{
name: "Side Navigation",
content: "src/layout/SideNavigation/SideNavigation.md"
}
]
},
{
name: "UI Components",
components: "src/components*/**/*.jsx",
usageMode: "expand",
ignore: "src/components*/Form/**/*.jsx",
sectionDepth: 1
},
{
name: "Form Components",
content: "src/components/Form/Form.md",
components: "src/components*/Form/**/*.jsx",
ignore: "src/components*/Form/Form.jsx",
usageMode: "expand",
sectionDepth: 1
}
],
// Override Styleguidist components
styleguideComponents: {
// LinkRenderer: path.join(__dirname, "src/Styleguide/LinkRendererWrapper")
},
webpackConfig: {
module: {
rules: [
// Babel loader, will use your project’s babel.config.js
{
test: /\.jsx?$/,
exclude: /node_modules/,
loader: "babel-loader"
},
// Other loaders that are needed for your components
{
test: /\.css$/,
use: ["style-loader", "css-loader"]
},
{
test: /\.scss$/,
use: ["style-loader", "css-loader", "sass-loader"]
},
{
test: /\.(woff(2)?|ttf|eot|svg)(\?v=\d+\.\d+\.\d+)?$/,
type: 'asset/resource'
}
]
}
}
};