forked from ant-design/pro-components
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.dumirc.ts
406 lines (400 loc) · 10.8 KB
/
.dumirc.ts
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
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
import chalk from 'chalk';
import { readdirSync } from 'fs';
import { join } from 'path';
import { defineConfig } from 'dumi';
const theme = require('@ant-design/antd-theme-variable');
const headPkgList: string[] = [];
// utils must build before core
// runtime must build before renderer-react
const pkgList = readdirSync(join(__dirname, 'packages')).filter(
(pkg) => pkg.charAt(0) !== '.' && !headPkgList.includes(pkg),
);
const alias = pkgList.reduce((pre, pkg) => {
pre[`@ant-design/pro-${pkg}`] = join(__dirname, 'packages', pkg, 'src');
return {
...pre,
};
}, {});
console.log(`🌼 alias list \n${chalk.blue(Object.keys(alias).join('\n'))}`);
const tailPkgList = pkgList.map((path) => `packages/${path}/src`);
export default defineConfig({
sitemap: { hostname: 'https://procomponents.ant.design' },
metas: [
{
property: 'og:site_name',
content: 'ProComponents',
},
{
'data-rh': 'keywords',
property: 'og:image',
content: 'https://procomponents.ant.design/icon.png',
},
{
property: 'og:description',
content: '🏆 让中后台开发更简单',
},
{
name: 'keywords',
content: '中后台,admin,Ant Design,ant design,Table,react,alibaba',
},
{
name: 'description',
content: '🏆 让中后台开发更简单 包含 table form 等多个组件。',
},
{
name: 'apple-mobile-web-app-capable',
content: 'yes',
},
{
name: 'apple-mobile-web-app-status-bar-style',
content: 'black-translucent',
},
{
name: 'theme-color',
content: '#1890ff',
},
{
name: 'google-site-verification',
content: '9LDp--DeEC-xOggsHl_t1MlR_1_2O972JpSUu8NZKMU',
},
],
styles: [
`
.dumi-default-sidebar {
min-width: 260px;
}
.dumi-default-previewer-demo {
min-height: 120px;
display: flex;
overflow: auto;
flex-direction: column;
}
.dumi-default-content-tabs{
margin: -24px -48px 48px !important;
}
.dumi-default-header:not([data-static]){
border-bottom: 1px solid #ddd;
}
.dumi-default-header-left {
min-width: 230px;
margin-right: 32px;
}
`,
],
favicons: ['https://gw.alipayobjects.com/zos/rmsportal/rlpTLlbMzTNYuZGGCVYM.png'],
alias,
resolve: {
docDirs: ['docs', ...tailPkgList],
},
locales: [
{ id: 'zh-CN', name: '中文' },
{ id: 'en-US', name: 'English' },
],
themeConfig: {
name: 'ProComponents',
logo: 'https://gw.alipayobjects.com/zos/antfincdn/upvrAjAPQX/Logo_Tech%252520UI.svg',
socialLinks: {
github: 'https://github.com/ant-design/pro-components',
},
nav: {
'zh-CN': [
{ title: '文档', link: '/docs' },
{ title: '组件', link: '/components' },
{ title: 'Changelog', link: '/changelog' },
{ title: 'Playground', link: '/playground' },
],
'en-US': [
{ title: 'Docs', link: '/en-US/docs' },
{ title: 'Components', link: '/en-US/components' },
{ title: 'Changelog', link: '/en-US/changelog' },
{ title: 'Playground', link: '/en-US/playground' },
],
},
sidebar: {
'/en-US/components': [
{
title: 'Architecture Design',
children: [
{
title: 'Component Design',
link: '/en-US/components',
},
{
title: 'General Schema',
link: '/en-US/components/schema',
},
],
},
{
title: 'Layout',
children: [
{
title: 'ProLayout',
link: '/en-US/components/layout',
},
{
title: 'PageContainer',
link: '/en-US/components/page-container',
},
{
title: 'ProCard',
link: '/en-US/components/card',
},
{
title: 'WaterMark',
link: '/en-US/components/water-mark',
},
{
title: 'StatisticCard',
link: '/en-US/components/statistic-card',
},
{
title: 'CheckCard',
link: '/en-US/components/check-card',
},
],
},
{
title: 'Data Entry',
children: [
{
title: 'ProForm',
link: '/en-US/components/form',
},
{
title: 'ProFormFields',
link: '/en-US/components/field-set',
},
{
title: 'ProFormList',
link: '/en-US/components/group',
},
{
title: 'ProFormDependency',
link: '/en-US/components/dependency',
},
{
title: 'Schema Form',
link: '/en-US/components/schema-form',
},
{
title: 'Query/LightFilter',
link: '/en-US/components/query-filter',
},
{
title: 'StepsForm',
link: '/en-US/components/steps-form',
},
{
title: 'Modal/Drawer Form',
link: '/en-US/components/modal-form',
},
{
title: 'LoginForm/LoginPageForm',
link: '/en-US/components/login-form',
},
],
},
{
title: 'Data Display',
children: [
{
title: 'ProTable',
link: '/en-US/components/table',
},
{
title: 'EditableProTable',
link: '/en-US/components/editable-table',
},
{
title: 'DragSortTable',
link: '/en-US/components/drag-sort-table',
},
{
title: 'ProList',
link: '/en-US/components/list',
},
{
title: 'ProDescriptions',
link: '/en-US/components/descriptions',
},
],
},
{
title: 'Universal',
children: [
{
title: 'ProSkeleton',
link: '/en-US/components/skeleton',
},
{
title: 'ProField',
link: '/en-US/components/field',
},
],
},
],
'/components': [
{
title: '架构设计',
children: [
{
title: 'Components - 组件设计',
link: 'components',
},
{
title: 'Schema - 通用配置',
link: '/components/schema',
},
],
},
{
title: '布局',
children: [
{
title: 'ProLayout - 高级布局',
link: '/components/layout',
},
{
title: 'PageContainer - 页容器',
link: '/components/page-container',
},
{
title: 'ProCard - 高级卡片',
link: '/components/card',
},
{
title: 'WaterMark - 水印组件',
link: '/components/water-mark',
},
{
title: 'StatisticCard - 指标卡',
link: '/components/statistic-card',
},
{
title: 'CheckCard - 多选卡片',
link: '/components/check-card',
},
],
},
{
title: '数据录入',
children: [
{
title: 'ProForm - 高级表单',
link: '/components/form',
},
{
title: 'ProFormFields - 表单项',
link: '/components/field-set',
},
{
title: 'ProFormList - 数据结构化',
link: '/components/group',
},
{
title: 'ProFormDependency - 数据联动',
link: '/components/dependency',
},
{
title: 'Schema Form - JSON 表单',
link: '/components/schema-form',
},
{
title: ' Query/LightFilter - 筛选表单',
link: '/components/query-filter',
},
{
title: 'StepsForm - 分步表单',
link: '/components/steps-form',
},
{
title: 'Modal/Drawer - 浮层表单',
link: '/components/modal-form',
},
{
title: 'LoginForm/Page - 登录表单',
link: '/components/login-form',
},
],
},
{
title: '数据展示',
children: [
{
title: 'ProTable - 高级表格',
link: '/components/table',
},
{
title: 'EditableProTable - 可编辑表格',
link: '/components/editable-table',
},
{
title: ' DragSortTable - 拖动排序表格',
link: '/components/drag-sort-table',
},
{
title: 'ProList - 高级列表',
link: '/components/list',
},
{
title: 'ProDescriptions - 定义列表',
link: '/components/descriptions',
},
],
},
{
title: '通用',
children: [
{
title: 'ProSkeleton - 骨架屏',
link: '/components/skeleton',
},
{
title: 'ProField - 原子组件',
link: '/components/field',
},
],
},
],
},
navs: {
'en-US': [
null,
{
title: 'GitHub',
path: 'https://github.com/ant-design/pro-components',
},
],
'zh-CN': [
null,
{
title: 'GitHub',
path: 'https://github.com/ant-design/pro-components',
},
],
},
},
hash: true,
theme: {
'@s-content-width': '1600px',
'@s-site-menu-width': '258px',
'@ant-prefix': 'ant',
'@root-entry-name': 'variable',
...theme,
'@primary-color': '#1677FF',
'@warning-color': '#faad14',
'@heading-color': 'rgba(0, 0, 0, 0.85)',
'@text-color': 'rgba(0, 0, 0, 0.65)',
'@text-color-secondary': 'rgba(0, 0, 0, 0.45)',
'@border-color-base': '#d9d9d9',
'@border-color-split': 'rgba(0, 0, 0, 0.06)',
'@border-radius-base': '4px',
'@card-radius': '6px',
'@table-border-radius-base': '6px',
'@box-shadow-base':
'0 2px 8px -2px rgba(0,0,0,0.05), 0 1px 4px -1px rgba(25,15,15,0.07), 0 0 1px 0 rgba(0,0,0,0.08)',
},
extraBabelPlugins: ['@emotion'],
ignoreMomentLocale: true,
});