-
Notifications
You must be signed in to change notification settings - Fork 2
/
doczrc.js
106 lines (106 loc) · 2.36 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
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
export default {
title: 'Expand Ui',
description: 'Expand components and modules',
theme: 'docz-theme-default',
hashRouter: true,
dest: 'docs',
base: '/expand-components/',
htmlContext: {
head: {
links: [
{
rel: 'stylesheet',
href: 'https://codemirror.net/theme/dracula.css',
},
],
raw: `
<style>
html {
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
html,
body {
font-family: 'Poppins';
margin: 0;
}
* {
box-sizing: initial;
border: 0;
margin: 0;
padding: 0;
}
.gem-docz-relative {
position: relative;
}
</style>
`,
},
},
themeConfig: {
codemirrorTheme: 'dracula',
colors: {
primary: '#1471EB',
sidebarBg: '#1C2541',
sidebarText: '#F3F9FF',
sidebarBorder: 'transparent',
},
styles: {
html: {
boxSizing: 'border-box',
},
body: {
fontFamily: 'Avenir',
},
playground: {
padding: ['20px', '5px'],
},
// container: {
// width: ['100%', '100%', 920],
// padding: ['20px', '0 40px 40px'],
// },
},
},
modifyBundlerConfig: (config) => {
const jsRules = config.module.rules[0];
jsRules.exclude = /node_modules\/(?!(@expandorg)\/).*/;
config.module.rules.push(
{
test: /^((?!\.module).)*\.styl$/,
use: [
'style-loader',
{
loader: 'css-loader',
options: {
sourceMap: true,
importLoaders: 2,
},
},
'postcss-loader?sourceMap',
'stylus-loader?paths[]=src',
],
exclude: /node_modules/,
},
{
test: /\.module\.styl$/,
use: [
'style-loader',
{
loader: `css-loader`,
options: {
sourceMap: true,
importLoaders: 2,
modules: {
localIdentName: '[local]__[path][name]__[hash:base64:5]',
},
},
},
'postcss-loader?sourceMap',
'stylus-loader?paths[]=src',
],
exclude: /node_modules/,
}
);
return config;
},
};