-
Notifications
You must be signed in to change notification settings - Fork 7
/
.umirc.ts
87 lines (85 loc) · 2.67 KB
/
.umirc.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
import { defineConfig } from 'dumi';
import path from 'path';
const ESLintPlugin = require('eslint-webpack-plugin');
// const resolve = dir => path.resolve(__dirname, dir);
export default defineConfig({
mode: 'site',
title: ' ',
favicon: 'https://www.shuyun.com/favicon.ico',
logo: 'https://brand-guide.shuyun.com/IAM/77c28a6547cd.png',
locales: [['zh-CN', '中文']],
outputPath: 'cloud-react-site',
hash: true,
resolve: {
includes: ['docs', 'src/components'],
},
navs: [
{
title: '指南',
path: '/guide',
},
{
title: '组件(v0版)',
path: '/cloud-react',
},
{
title: '组件(v1版)',
path: 'https://cloud-react.shuyun.com/v1/cloud-react',
},
{
title: '数云Echarts图表库',
// 可通过如下形式嵌套二级导航菜单,目前暂不支持更多层级嵌套:
path: 'https://qa-charts.shuyun.com/',
},
{
title: '数云Taro千牛组件库',
// 可通过如下形式嵌套二级导航菜单,目前暂不支持更多层级嵌套:
path: 'https://ui.shuyun.com/',
},
{
title: 'utils工具库',
// 可通过如下形式嵌套二级导航菜单,目前暂不支持更多层级嵌套:
path: 'https://github.com/ShuyunFF2E/shuyun-utils',
},
],
alias: {
'@utils': path.resolve(__dirname, 'src/utils'),
'@contexts': path.resolve(__dirname, 'src/contexts'),
'@components': path.resolve(__dirname, 'src/components'),
},
// chainWebpack: function(config, { webpack }) {
// config
// .plugin('lint')
// .use(new ESLintPlugin, [{
// files: ['src'],
// extensions: ['jsx', 'js'],
// }])
// .end()
// },
// chainWebpack: function(memo, { env, webpack, createCSSRule }) {
// memo.module
// .rule('markdown')
// .test(/\.md$/)
// .pre()
// .include
// .add(path.resolve('src/components/bread-crumbs'))
// .end()
// .use('markdown')
// .loader(path.resolve('loader/index.js'))
// .options({
// pattern: /#{1,6}\s+API/,
// insert: {
// before: true,
// value: '### 代码演示\n123'
// }
// })
// },
styles: [
` .__dumi-default-layout-hero { height: 420px; box-sizing: border-box; padding: 120px 0 100px !important; background: url(https://brand-guide.shuyun.com/IAM/2487d4cef63a.jpg) 100% !important; }
.__dumi-default-navbar-logo { transform: scale(1.5) }
.__dumi-default-layout-hero img { margin-top: -50px }
.__dumi-default-layout-hero h1 { color: white !important }
.__dumi-default-layout-hero .markdown { color: white !important }
`
],
});