forked from pmndrs/react-spring
-
Notifications
You must be signed in to change notification settings - Fork 0
/
doczrc.js
157 lines (155 loc) · 3.95 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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
const path = require('path')
const UglifyJsPlugin = require('uglifyjs-webpack-plugin')
console.log(path.resolve('./src/targets/web'))
export default {
protocol: 'http',
title: '✌️ react-spring',
htmlContext: {
head: {
links: [
{
rel: 'stylesheet',
href: 'https://codemirror.net/theme/dracula.css',
}
],
raw: `
<style>
#root > div > div:first-of-type {
width: 350px;
min-width: 350px;
}
#root > div > div:first-of-type > div:first-of-type {
padding: 30px;
width: 350px;
min-width: 350px;
}
#root > div > div:first-of-type > div:first-of-type > div:last-of-type {
display: none;
}
#root > div > div:first-of-type > div:first-of-type > div:nth-child(2):before {
background: transparent;
}
#root > div > div:first-of-type > div:first-of-type > div:nth-child(2) h1 {
font-size: 2.5em;
font-weight: 100;
}
.scrollbar-container {
max-height: unset!important;
}
.CodeMirror {
font-size: 14px;
height: 100%!important;
}
.CodeMirror pre {
line-height: 20.8px!important;
}
.CodeMirror-line {
padding: 0 10px!important;
}
.CodeMirror-lines {
padding: 10px 0!important;
}
.CodeMirror-linenumber {
padding: 0 7px 0 5px!important;
}
.code-table {
display: flex;
}
.code-table > div:first-of-type {
flex: 1.5;
}
.code-table > div:last-of-type {
flex: 1;
}
.code-table > div:last-child {
position: relative;
display: flex;
align-items: center;
justify-content: center;
background: #f4f6f9;
font-family: -apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue, helvetica, ubuntu, roboto, noto,
segoe ui, arial, sans-serif;
font-size: 4em;
font-weight: 600;
color: white;
}
.highlight {
background: #ea567c;
color: white;
margin: 0 3px;
padding: 4px 6px;
border-radius: 3px;
}
.grommetux-meter {
height: 70px;
}
.grommetux-meter__graphic {
fill: transparent;
stroke-linecap: round;
stroke-linejoin: round;
stroke-width: 15px;
width: 70px;
height: 70px;
}
.grommetux-meter__tracks {
stroke: white;
}
.grommetux-meter__values {
stroke: rgb(45, 55, 71);
}
code {
background: #f4f6f9;
color: #7D899C;
margin: 0 3px;
padding: 4px 6px;
border-radius: 3px;
font-family: "Source Code Pro",monospace;
font-size: 14px;
}
a, a:visited, a:active {
color: rgb(31, 182, 255);
text-decoration: none;
cursor: pointer;
}
</style>
`,
},
},
themeConfig: {
//mode: 'dark',
codemirrorTheme: 'dracula',
colors: {
primary: '#ea567c',
sidebarBg: 'white',
},
styles: {
body: {
fontFamily:
'-apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue, helvetica, ubuntu, roboto, noto, segoe ui, arial, sans-serif',
},
h1: {
fontSize: '4em',
fontWeight: 800,
},
},
},
modifyBundlerConfig: (config, dev, args) => {
return {
...config,
module: {
...config.module,
rules: [
...config.module.rules,
{ test: () => true, sideEffects: true },
],
},
resolve: {
...config.resolve,
alias: {
...config.resolve.alias,
'react-spring': path.resolve('./src/targets/web')
}
}
}
},
}