forked from oceanbase/oceanbase-design
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.dumirc.ts
327 lines (326 loc) · 12.3 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
import fs from 'fs';
import path from 'path';
import { defineConfig } from 'dumi';
import AntdAliasWebpackPlugin from './antd-alias-webpack-plugin';
import rehypePlugin from './.dumi/rehypePlugin';
import remarkPlugin from './.dumi/remarkPlugin';
export default defineConfig({
mfsu: {
// to make AntdAliasWebpackPlugin work
exclude: ['antd-token-previewer'],
},
// 默认重定向到子包的 src 文件夹
// ref: https://d.umijs.org/config#monoreporedirect
monorepoRedirect: {
useRootProject: true,
},
// umi.server.js build error, disable it for now
// ssr: process.env.NODE_ENV === 'production' ? {} : false,
hash: true,
crossorigin: {},
// ref: https://d.umijs.org/config#sitemap
sitemap: {
hostname: 'https://design.oceanbase.com',
},
extraRehypePlugins: [rehypePlugin],
extraRemarkPlugins: [remarkPlugin],
extraBabelPresets: [require.resolve('@emotion/babel-preset-css-prop')],
chainWebpack: config => {
const esPath = path.join(__dirname, 'packages/design/es');
const libPath = path.join(__dirname, 'packages/design/es');
// AntdAliasWebpackPlugin depends es and lib of @oceanbase/design
if (fs.existsSync(esPath) && fs.existsSync(libPath)) {
config.plugin('antd-alias').use(AntdAliasWebpackPlugin);
}
return config;
},
outputPath: 'site',
define: {
'process.env.VERCEL_ANALYTICS_ID': process.env.VERCEL_ANALYTICS_ID,
},
analytics: {
ga_v2: 'G-81Y5XPZY2E',
},
headScripts: [
// Microsoft clarity script
`(function(c,l,a,r,i,t,y){
c[a]=c[a]||function(){(c[a].q=c[a].q||[]).push(arguments)};
t=l.createElement(r);t.async=1;t.src="https://www.clarity.ms/tag/"+i;
y=l.getElementsByTagName(r)[0];y.parentNode.insertBefore(t,y);
})(window, document, "clarity", "script", "n5kn7gme0s");`,
],
metas: [
{
property: 'og:site_name',
content: 'OceanBase Design',
},
{
'data-rh': 'keywords',
property: 'og:image',
content:
'https://mdn.alipayobjects.com/huamei_n8rchn/afts/img/A*d_ZTR7sdVzAAAAAAAAAAAAAADvSFAQ/original',
},
{
property: 'og:description',
content: '🌈 基于 Ant Design 进行延展和二次开发的企业级设计系统',
},
{
name: 'keywords',
content:
'OceanBase,oceanbase,OceanBase Design,oceanbase design,ui,react,component,library,typescript,chart',
},
{
name: 'description',
content:
'🌈 基于 Ant Design 进行延展和二次开发的企业级设计系统,帮助设计开发者快速搭建具备「专业感」的产品',
},
{
name: 'apple-mobile-web-app-capable',
content: 'yes',
},
{
name: 'apple-mobile-web-app-status-bar-style',
content: 'black-translucent',
},
{
name: 'theme-color',
content: '#006AFF',
},
{
name: 'google-site-verification',
content: '6w1DTgL9q7k3aVfHCgHYkMedx7Av5yqiWoaELwfTofk',
},
{
name: 'baidu-site-verification',
content: 'codeva-7qwXtDi3fM',
},
],
resolve: {
docDirs: [
{ type: 'doc', dir: 'docs' },
{ type: 'doc', dir: 'docs/design' },
{ type: 'doc', dir: 'docs/ui' },
{ type: 'doc', dir: 'docs/charts' },
],
atomDirs: [
{ type: 'component', dir: 'packages/design/src' },
{ type: 'biz-component', dir: 'packages/ui/src' },
{ type: 'chart', dir: 'packages/charts/src' },
],
codeBlockMode: 'passive',
},
alias: {
// 需要将子路径前移,否则会优先匹配到父路径导致子路径匹配异常
'@oceanbase/design/es': path.join(__dirname, 'packages/design/src'),
'@oceanbase/design/locale': path.join(__dirname, 'packages/design/src/locale'),
'@oceanbase/design': path.join(__dirname, 'packages/design/src'),
// for @import in less
'~@oceanbase/design/es': path.join(__dirname, 'packages/design/src'),
'@oceanbase/icons': path.join(__dirname, 'packages/icons/src'),
'@oceanbase/ui': path.join(__dirname, 'packages/ui/src'),
'@oceanbase/ui/es': path.join(__dirname, 'packages/ui/src'),
'@oceanbase/ui/locale': path.join(__dirname, 'packages/ui/src/locale'),
'@oceanbase/charts': path.join(__dirname, 'packages/charts/src'),
'@oceanbase/charts/es': path.join(__dirname, 'packages/charts/src'),
'@oceanbase/util': path.join(__dirname, 'packages/util/src'),
},
favicons: [
'https://mdn.alipayobjects.com/huamei_n8rchn/afts/img/A*d_ZTR7sdVzAAAAAAAAAAAAAADvSFAQ/original',
],
themeConfig: {
sidebar: {
'/components': [
{
title: '通用',
children: [
{ title: 'Button 按钮', link: '/components/button' },
{ title: 'Icon 图标', link: '/components/icon' },
{ title: 'Typography 排版', link: '/components/typography' },
],
},
{
title: '导航',
children: [
{ title: 'Breadcrumb 面包屑', link: '/components/breadcrumb' },
{ title: 'Dropdown 下拉菜单', link: '/components/dropdown' },
],
},
{
title: '布局',
children: [
{ title: 'Divider 分割线', link: '/components/divider' },
{ title: 'Grid 栅格', link: '/components/grid' },
{ title: 'Space 间距', link: '/components/space' },
],
},
{
title: '数据录入',
children: [
{ title: 'Cascader 级联选择', link: '/components/cascader' },
{ title: 'Form 表单', link: '/components/form' },
{ title: 'Input 输入框', link: '/components/input' },
{ title: 'InputNumber 数字输入框', link: '/components/input-number' },
{ title: 'Radio 单选框', link: '/components/radio' },
{ title: 'Checkbox 多选框', link: '/components/checkbox' },
{ title: 'Switch 开关', link: '/components/switch' },
{ title: 'Select 选择器', link: '/components/select' },
{ title: 'TreeSelect 树选择', link: '/components/tree-select' },
{ title: 'Slider 滑动输入条', link: '/components/slider' },
{ title: 'DatePicker 日期选择框', link: '/components/date-picker' },
{ title: 'TimePicker 时间选择器', link: '/components/time-picker' },
],
},
{
title: '数据展示',
children: [
{ title: 'Card 卡片', link: '/components/card' },
{ title: 'Collapse 折叠面板', link: '/components/collapse' },
{ title: 'Descriptions 描述列表', link: '/components/descriptions' },
{ title: 'Empty 空状态', link: '/components/empty' },
{ title: 'List 列表', link: '/components/list' },
{ title: 'Popover 气泡卡片', link: '/components/popover' },
{ title: 'Table 表格', link: '/components/table' },
{ title: 'Tabs 标签页', link: '/components/tabs' },
{ title: 'Tag 标签', link: '/components/tag' },
{ title: 'Tooltip 文字提示', link: '/components/tooltip' },
{
title: 'Segmented 分段控制器',
link: '/components/segmented',
},
],
},
{
title: '反馈',
children: [
{ title: 'Alert 警告提示', link: '/components/alert' },
{ title: 'Message 全局提示', link: '/components/message' },
{ title: 'Modal 对话框', link: '/components/modal' },
{ title: 'Drawer 抽屉', link: '/components/drawer' },
{ title: 'Notification 通知提醒框', link: '/components/notification' },
{ title: 'Popconfirm 气泡确认框', link: '/components/popconfirm' },
{ title: 'Progress 进度条', link: '/components/progress' },
{ title: 'Result 结果', link: '/components/result' },
{ title: 'Skeleton 骨架屏', link: '/components/skeleton' },
{ title: 'Spin 加载中', link: '/components/spin' },
{ title: 'Badge 徽标数', link: '/components/badge' },
],
},
{
title: '基础能力',
children: [{ title: 'ConfigProvider 全局化配置', link: '/components/config-provider' }],
},
],
'/biz-components': [
{
title: '布局',
children: [
{ title: 'BasicLayout 导航和布局', link: '/biz-components/basic-layout' },
{ title: 'PageContainer 页容器', link: '/biz-components/page-container' },
{ title: 'PageLoading 页面级加载', link: '/biz-components/page-loading' },
{ title: 'FooterToolbar 底部操作栏', link: '/biz-components/footer-toolbar' },
{ title: 'Login 登录页', link: '/biz-components/login' },
// { title: 'NavMenu', link: '/biz-components/nav-menu' },
{ title: 'Welcome 欢迎页', link: '/biz-components/welcome' },
],
},
{
title: 'ProComponents 组件',
children: [
{ title: 'ProCard 高级卡片', link: '/biz-components/pro-card' },
{ title: 'ProTable 高级表格', link: '/biz-components/pro-table' },
{ title: 'LightFilter 轻量筛选', link: '/biz-components/light-filter' },
],
},
{
title: '可视化',
children: [
{ title: 'TaskGraph 任务流程图', link: '/biz-components/task-graph' },
{ title: 'GraphToolbar 图工具栏', link: '/biz-components/graph-toolbar' },
],
},
{
title: '其他',
children: [
{ title: 'Action 操作项', link: '/biz-components/action' },
{
title: 'ContentWithQuestion 问号旁提示',
link: '/biz-components/content-with-question',
},
{
title: 'ContentWithIcon 文字旁提示',
link: '/biz-components/content-with-icon',
},
{ title: 'Ranger 日期时间选择', link: '/biz-components/ranger' },
{ title: 'DateRanger 新版日期时间选择', link: '/biz-components/date-ranger' },
{ title: 'TreeSearch 树搜索', link: '/biz-components/tree-search' },
{ title: 'Password 密码输入框', link: '/biz-components/password' },
{ title: 'Boundary 错误兜底', link: '/biz-components/boundary' },
{ title: 'Dialog 嵌入弹窗', link: '/biz-components/dialog' },
{ title: 'DocDialog 文档嵌入弹窗', link: '/biz-components/doc-dialog' },
{ title: 'Lottie 动效', link: '/biz-components/lottie' },
{ title: 'BatchOperationBar 批量操作栏', link: '/biz-components/batch-operation-bar' },
{
title: 'BackgroundTaskManager 后台任务管理器',
link: '/biz-components/background-task-manager',
},
{ title: 'TagSelect 标签式单选/多选', link: '/biz-components/tag-select' },
],
},
],
'/charts': [
{
children: [
{
title: 'Stat 数字统计',
link: '/charts/stat',
},
{
title: 'Score 得分图',
link: '/charts/score',
},
{
title: 'Line 折线图',
link: '/charts/line',
},
{
title: 'Area 面积图',
link: '/charts/area',
},
{
title: 'Bar 条形图',
link: '/charts/bar',
},
{
title: 'Column 柱状图',
link: '/charts/column',
},
{
title: 'Histogram 直方图',
link: '/charts/histogram',
},
{
title: 'DualAxes 双轴图',
link: '/charts/dual-axes',
},
{
title: 'Pie 饼图&环图',
link: '/charts/pie',
},
{
title: 'Gauge 仪表盘',
link: '/charts/gauge',
},
{
title: 'Liquid 水波图',
link: '/charts/liquid',
},
{
title: 'Tiny 迷你图',
link: '/charts/tiny',
},
],
},
],
},
},
});