-
Notifications
You must be signed in to change notification settings - Fork 1.4k
/
.dumirc.ts
426 lines (419 loc) · 11.7 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
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
import chalk from 'chalk';
import { defineConfig } from 'dumi';
import { readdirSync } from 'fs';
import { join } from 'path';
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,
};
}, {} as Record<string, string>);
console.log(`🌼 alias list \n${chalk.blue(Object.keys(alias).join('\n'))}`);
const tailPkgList = pkgList.map((path) => `packages/${path}/src/components`);
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',
},
],
analytics: {
ga_v2: 'G-RMBLDHGL1N',
},
favicons: [
'https://gw.alipayobjects.com/zos/rmsportal/rlpTLlbMzTNYuZGGCVYM.png',
],
alias,
resolve: {
docDirs: ['docs'],
atomDirs: tailPkgList.map((dir) => ({ type: 'component', dir })),
},
styles: [`.markdown table{table-layout: fixed;}`],
locales: [
{ id: 'zh-CN', name: '中文' },
{ id: 'en-US', name: 'English' },
],
// ssr: {},
themeConfig: {
lastUpdated: true,
hero: {
title: 'ProComponents',
description: '🏆 让中后台开发更简单',
actions: {
text: '🏮🏮 快速开始 →',
link: '/docs/intro',
},
},
features: [
{
image:
'https://mdn.alipayobjects.com/yuyan_qk0oxh/afts/img/q48YQ5X4ytAAAAAAAAAAAAAAFl94AQBr',
title: '简单易用',
description: '在 Ant Design 上进行了自己的封装,更加易用',
},
{
image:
'https://gw.alipayobjects.com/zos/rmsportal/KDpgvguMpGfqaHPjicRK.svg',
title: 'Ant Design',
description: '与 Ant Design 设计体系一脉相承,无缝对接 Ant Design 项目',
},
{
image:
'https://mdn.alipayobjects.com/yuyan_qk0oxh/afts/img/UKqDTIp55HYAAAAAAAAAAAAAFl94AQBr',
title: '国际化',
description: '提供完备的国际化,与 Ant Design 体系打通,无需多余配置',
},
{
image:
'https://mdn.alipayobjects.com/yuyan_qk0oxh/afts/img/Y_NMQKxw7OgAAAAAAAAAAAAAFl94AQBr',
title: '预设样式',
description:
'样式风格与 Ant Design 一脉相承,无需魔改,浑然天成。默认好用的主题系统',
},
{
image:
'https://mdn.alipayobjects.com/yuyan_qk0oxh/afts/img/U3XjS5IA1tUAAAAAAAAAAAAAFl94AQBr',
title: '预设行为',
description: '更少的代码,更少的 Bug,更多的功能',
},
{
image:
'https://gw.alipayobjects.com/zos/antfincdn/Eb8IHpb9jE/Typescript_logo_2020.svg',
title: 'TypeScript',
description:
'使用 TypeScript 开发,提供完整的类型定义文件,无需频繁打开官网',
},
],
siteToken: { demoInheritSiteTheme: true },
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' },
{
title: '国内镜像',
link: 'https://pro-components.antdigital.dev',
},
],
'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',
},
],
},
apiHeader: false,
},
hash: true,
ignoreMomentLocale: true,
});