forked from MyCupOfTeaOo/teaness
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdoczrc.js
67 lines (65 loc) · 2.21 KB
/
doczrc.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
import { css } from 'docz-plugin-css';
export default {
base: '/teaness/',
dest: 'docs',
typescript: true,
menu: [
'Getting Started',
'Display(展示)',
'components',
'Form Component',
'hooks',
],
theme: 'docz-theme-ztopia',
themeConfig: {
colors: {
blackLight: '#242635', // sidebar background (dark), table header background (dark), preview handle background (dark), <blockquote> background, <code> background
black: '#151725', // page background (dark)
blackDark: '#0e1019', // text
whiteLight: '#fcfcfd', // text
white: '#ffffff', // page background (light)
whiteDark: '#f5f7f9', // sidebar background (light), table header background (light), preview handle background (light), <blockquote> background, <code> background
grey: '#d1d4db', // table border, preview border, preview handle bars
primaryLight: '#d9eaff', // sidebar menu item (hovered)
primary: '#40a9ff', // brand background, link, thematic break, preview error type, props table property name, <h1>, <blockquote> border left, search result
primaryDark: '#0046a3', // link (hovered)
secondary: '#595959', // props table shape type, brand background, <hr>, search result
highlight: '#fa8c16', // matched search query
error: 'rgba(200,0,0,0.8)', // preview error background
},
fonts: {
body:
'-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif',
title:
'-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif',
},
logo: {
src: null,
width: 40,
},
},
plugins: [
css({
preprocessor: 'postcss',
}),
css({
preprocessor: 'sass',
}),
css({
preprocessor: 'less',
loaderOpts: {
javascriptEnabled: true,
},
}),
],
filterComponents: files =>
files.filter(filepath => /[w-]*.(js|jsx|ts|tsx)$/.test(filepath)),
modifyBabelRc: babelrc => {
// 需放 class-properties 前面
babelrc.plugins.unshift([
require.resolve('@babel/plugin-proposal-decorators'),
{ legacy: true },
]);
return babelrc;
},
};