forked from eskimoblood/rc-knob
-
Notifications
You must be signed in to change notification settings - Fork 2
/
styleguide.config.js
74 lines (73 loc) · 1.51 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
const path = require('path');
module.exports = {
title: 'rc-knob',
version: "1.2.0",
/*
template: {
favicon: 'docs/assets/favicon.ico'
},
*/
styleguideDir: "dist",
sections: [
{
name: 'Knob',
content: 'docs/knob.md'
},
{
name: 'Base components',
content: 'docs/basecomponents.md'
},
{
name: 'User interaction',
content: 'docs/interaction.md'
},
{
name: 'Examples',
sections: [
{
name: 'Basic',
content: 'docs/example_basic.md'
},
{
name: 'Stylized',
content: 'docs/example_stylized.md'
},
{
name: 'Custom',
content: 'docs/example_custom.md'
},
{
name: 'Gradient',
content: 'docs/example_gradient.md'
},
{
name: 'Async',
content: 'docs/example_async.md'
},
]
},
],
skipComponentsWithoutExample: true,
require: [
path.join(__dirname, 'docs/assets/examples.css'),
path.join(__dirname, 'docs/assets/rsg.css'),
],
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'],
}
]
}
},
pagePerSection: true,
};