Skip to content

Commit 065ac98

Browse files
authored
feat: dumi 1.x -> 2.x (#429)
1 parent d7cab0a commit 065ac98

12 files changed

+70
-36
lines changed

.dumirc.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import { defineConfig } from 'dumi';
2+
import path from 'path';
3+
4+
export default defineConfig({
5+
alias: {
6+
'rc-tooltip$': path.resolve('src'),
7+
'rc-tooltip/es': path.resolve('src'),
8+
},
9+
mfsu: false,
10+
favicons: ['https://avatars0.githubusercontent.com/u/9441414?s=200&v=4'],
11+
themeConfig: {
12+
name: 'Tooltip',
13+
logo: 'https://avatars0.githubusercontent.com/u/9441414?s=200&v=4',
14+
},
15+
});

.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,8 @@ package-lock.json
3535
.umi
3636
.umi-production
3737
.umi-test
38-
.env.local
38+
.env.local
39+
40+
# dumi
41+
.dumi/tmp
42+
.dumi/tmp-production

.umirc.ts

Lines changed: 0 additions & 19 deletions
This file was deleted.

docs/demo/arrowContent.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1-
## arrowContent
1+
---
2+
title: arrowContent
3+
nav:
4+
title: Demo
5+
path: /demo
6+
---
27

3-
<code src="../examples/arrowContent.tsx">
8+
<code src="../examples/arrowContent.tsx"></code>

docs/demo/formError.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1-
## formError
1+
---
2+
title: formError
3+
nav:
4+
title: Demo
5+
path: /demo
6+
---
27

3-
<code src="../examples/formError.tsx">
8+
<code src="../examples/formError.tsx"></code>

docs/demo/onVisibleChange.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1-
## onVisibleChange
1+
---
2+
title: onVisibleChange
3+
nav:
4+
title: Demo
5+
path: /demo
6+
---
27

3-
<code src="../examples/onVisibleChange.tsx">
8+
<code src="../examples/onVisibleChange.tsx"></code>

docs/demo/placement.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1-
## placement
1+
---
2+
title: placement
3+
nav:
4+
title: Demo
5+
path: /demo
6+
---
27

3-
<code src="../examples/placement.tsx">
8+
<code src="../examples/placement.tsx"></code>

docs/demo/showArrow.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1-
## showArrow
1+
---
2+
title: showArrow
3+
nav:
4+
title: Demo
5+
path: /demo
6+
---
27

3-
<code src="../examples/showArrow.tsx">
8+
<code src="../examples/showArrow.tsx"></code>

docs/demo/simple.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1-
## simple
1+
---
2+
title: simple
3+
nav:
4+
title: Demo
5+
path: /demo
6+
---
27

3-
<code src="../examples/simple.tsx">
8+
<code src="../examples/simple.tsx"></code>

docs/index.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
---
2-
title: rc-tooltip
2+
hero:
3+
title: rc-tooltip
4+
description: React Tooltip
35
---
46

7+
58
<embed src="../README.md"></embed>

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
"@types/react-dom": "^16.9.2",
4949
"@types/warning": "^3.0.0",
5050
"cross-env": "^7.0.0",
51-
"dumi": "^1.1.0",
51+
"dumi": "^2.1.1",
5252
"enzyme": "^3.10.0",
5353
"enzyme-adapter-react-16": "^1.15.1",
5454
"enzyme-to-json": "^3.4.3",

tsconfig.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@
99
"esModuleInterop": true,
1010
"paths": {
1111
"@/*": ["src/*"],
12-
"@@/*": ["src/.umi/*"],
12+
"@@/*": [".dumi/tmp/*"],
1313
"rc-tooltip": ["src/index.tsx"]
1414
}
15-
}
15+
},
16+
"include": [".dumi/**/*", ".dumirc.ts", "./src/**/*.ts", "./src/**/*.tsx", "./docs/**/*.tsx"]
1617
}

0 commit comments

Comments
 (0)