-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathstyleguide.config.js
83 lines (80 loc) · 2.05 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
/**
* Copyright (c) Quid, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
// @noflow
const fs = require('fs');
const override = require('./config-overrides').webpack;
const ignore = [
'**/__mocks__/**',
'**/*.test.js',
'**/*.spec.js',
'**/node_modules/**',
];
const packages = fs
.readdirSync('./packages')
.filter(pkg => fs.existsSync(`packages/${pkg}/README.md`))
.map(pkg => ({
name: pkg,
content: `packages/${pkg}/README.md`,
components: [`packages/${pkg}/**/index.js`],
ignore,
}));
module.exports = {
webpackConfig: override(
require('react-scripts/config/webpack.config')('development')
),
ignore: ['**/*.{test,spec}.js', '**/dist/**/*'],
skipComponentsWithoutExample: true,
sections: [
{
name: 'Introduction',
content: 'docs/introduction.md',
},
{
name: 'Packages',
sections: packages,
},
],
usageMode: 'expand',
require: ['@quid/theme/fonts/index.css', './src/index.css'],
styleguideComponents: {
StyleGuide: require.resolve('./src/components/StyleGuide'),
Wrapper: require.resolve('./src/components/Wrapper'),
Link: require.resolve('./src/components/Link'),
Logo: require.resolve('./src/components/Logo'),
TableOfContentsRenderer: require.resolve(
'./src/components/TableOfContentsRenderer'
),
ComponentsListRenderer: require.resolve(
'./src/components/ComponentsListRenderer'
),
Examples: require.resolve('./src/components/Examples'),
SectionHeading: require.resolve('./src/components/SectionHeading'),
},
theme: {
sidebarWidth: 300,
color: {
base: '#2E3338',
baseBackground: '#FFFFFF',
sidebarBackground: '#FFFFFF',
border: '#E3E6E8',
},
fontFamily: {
base: 'IBM Plex Sans, Lucida Grande, Tahoma, Verdana, Arial, sans-serif',
},
fontSize: {
h1: 30,
h2: 24,
h3: 20,
h4: 16,
h5: 14,
h6: 14,
base: 14,
text: 14,
small: 12,
},
},
};