From d49212b2ed907fc26797e0f42df0b5795077c9ae Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?kiner-tang=28=E6=96=87=E8=BE=89=29?= <1127031143@qq.com>
Date: Sat, 18 Mar 2023 23:14:22 +0800
Subject: [PATCH] chore: dumi 1.x -> 2.x (#608)
* chore: dumi 1.x -> 2.x
* chore: dumi 1.x -> 2.x
* chore: dumi 1.x -> 2.x
---
.dumirc.ts | 9 +++++++++
.gitignore | 6 +++++-
.umirc.ts | 19 -------------------
docs/changelog.md | 1 +
docs/demo/basic.md | 10 ++++++++--
docs/demo/calendar.md | 10 ++++++++--
docs/demo/customize.md | 10 ++++++++--
docs/demo/disabledDate.md | 10 ++++++++--
docs/demo/modes.md | 10 ++++++++--
docs/demo/panel.md | 10 ++++++++--
docs/demo/panelRender.md | 10 ++++++++--
docs/demo/range.md | 10 ++++++++--
docs/demo/rtl.md | 10 ++++++++--
docs/demo/switchType.md | 10 ++++++++--
docs/demo/time.md | 10 ++++++++--
docs/demo/uncontrolled.md | 10 ++++++++--
docs/index.md | 8 ++++++++
now.json | 2 +-
package.json | 5 ++---
tsconfig.json | 7 ++++---
20 files changed, 126 insertions(+), 51 deletions(-)
create mode 100644 .dumirc.ts
delete mode 100644 .umirc.ts
create mode 100644 docs/changelog.md
create mode 100644 docs/index.md
diff --git a/.dumirc.ts b/.dumirc.ts
new file mode 100644
index 000000000..b6782cffd
--- /dev/null
+++ b/.dumirc.ts
@@ -0,0 +1,9 @@
+import { defineConfig } from 'dumi';
+
+export default defineConfig({
+ favicons: ['https://avatars0.githubusercontent.com/u/9441414?s=200&v=4'],
+ themeConfig: {
+ name: 'Picker',
+ logo: 'https://avatars0.githubusercontent.com/u/9441414?s=200&v=4',
+ },
+});
diff --git a/.gitignore b/.gitignore
index d4eada084..c1cfea340 100644
--- a/.gitignore
+++ b/.gitignore
@@ -35,4 +35,8 @@ coverage/
.umi
.umi-production
.umi-test
-.env.local
\ No newline at end of file
+.env.local
+
+# dumi
+.dumi/tmp
+.dumi/tmp-production
\ No newline at end of file
diff --git a/.umirc.ts b/.umirc.ts
deleted file mode 100644
index f7f87defb..000000000
--- a/.umirc.ts
+++ /dev/null
@@ -1,19 +0,0 @@
-// more config: https://d.umijs.org/config
-import { defineConfig } from 'dumi';
-
-export default defineConfig({
- title: 'rc-picker',
- favicon:
- 'https://avatars0.githubusercontent.com/u/9441414?s=200&v=4',
- logo:
- 'https://avatars0.githubusercontent.com/u/9441414?s=200&v=4',
- outputPath: '.doc',
- exportStatic: {},
- styles: [
- `
- .markdown table {
- width: auto !important;
- }
- `,
- ]
-});
\ No newline at end of file
diff --git a/docs/changelog.md b/docs/changelog.md
new file mode 100644
index 000000000..beb2eddcc
--- /dev/null
+++ b/docs/changelog.md
@@ -0,0 +1 @@
+
diff --git a/docs/demo/basic.md b/docs/demo/basic.md
index 3c776019e..0f2244046 100644
--- a/docs/demo/basic.md
+++ b/docs/demo/basic.md
@@ -1,2 +1,8 @@
-## basic
-
+---
+title: basic
+nav:
+ title: Demo
+ path: /demo
+---
+
+
diff --git a/docs/demo/calendar.md b/docs/demo/calendar.md
index 2f4aa252a..d1664a6b8 100644
--- a/docs/demo/calendar.md
+++ b/docs/demo/calendar.md
@@ -1,2 +1,8 @@
-## calendar
-
+---
+title: calendar
+nav:
+ title: Demo
+ path: /demo
+---
+
+
diff --git a/docs/demo/customize.md b/docs/demo/customize.md
index 821f5772b..7f3b7c568 100644
--- a/docs/demo/customize.md
+++ b/docs/demo/customize.md
@@ -1,2 +1,8 @@
-## customize
-
+---
+title: customize
+nav:
+ title: Demo
+ path: /demo
+---
+
+
diff --git a/docs/demo/disabledDate.md b/docs/demo/disabledDate.md
index 81288213a..ffab74fda 100644
--- a/docs/demo/disabledDate.md
+++ b/docs/demo/disabledDate.md
@@ -1,2 +1,8 @@
-## disabledDate
-
+---
+title: disabledDate
+nav:
+ title: Demo
+ path: /demo
+---
+
+
diff --git a/docs/demo/modes.md b/docs/demo/modes.md
index 0372e3752..e987e368e 100644
--- a/docs/demo/modes.md
+++ b/docs/demo/modes.md
@@ -1,2 +1,8 @@
-## modes
-
+---
+title: modes
+nav:
+ title: Demo
+ path: /demo
+---
+
+
diff --git a/docs/demo/panel.md b/docs/demo/panel.md
index 52bf42c6a..1cff54b34 100644
--- a/docs/demo/panel.md
+++ b/docs/demo/panel.md
@@ -1,2 +1,8 @@
-## panel
-
+---
+title: panel
+nav:
+ title: Demo
+ path: /demo
+---
+
+
diff --git a/docs/demo/panelRender.md b/docs/demo/panelRender.md
index 1c581e513..84b6d56ea 100644
--- a/docs/demo/panelRender.md
+++ b/docs/demo/panelRender.md
@@ -1,2 +1,8 @@
-## panelRender
-
+---
+title: panelRender
+nav:
+ title: Demo
+ path: /demo
+---
+
+
diff --git a/docs/demo/range.md b/docs/demo/range.md
index 96ba5eb6b..cef543419 100644
--- a/docs/demo/range.md
+++ b/docs/demo/range.md
@@ -1,2 +1,8 @@
-## range
-
+---
+title: range
+nav:
+ title: Demo
+ path: /demo
+---
+
+
diff --git a/docs/demo/rtl.md b/docs/demo/rtl.md
index 70c292a0a..9b97cd343 100644
--- a/docs/demo/rtl.md
+++ b/docs/demo/rtl.md
@@ -1,2 +1,8 @@
-## rtl
-
+---
+title: rtl
+nav:
+ title: Demo
+ path: /demo
+---
+
+
diff --git a/docs/demo/switchType.md b/docs/demo/switchType.md
index c0a5d1f2b..36ccc965e 100644
--- a/docs/demo/switchType.md
+++ b/docs/demo/switchType.md
@@ -1,2 +1,8 @@
-## switchType
-
+---
+title: switchType
+nav:
+ title: Demo
+ path: /demo
+---
+
+
diff --git a/docs/demo/time.md b/docs/demo/time.md
index 640d32f31..9a71b0c1f 100644
--- a/docs/demo/time.md
+++ b/docs/demo/time.md
@@ -1,2 +1,8 @@
-## time
-
+---
+title: time
+nav:
+ title: Demo
+ path: /demo
+---
+
+
diff --git a/docs/demo/uncontrolled.md b/docs/demo/uncontrolled.md
index e522eae9a..9a3043582 100644
--- a/docs/demo/uncontrolled.md
+++ b/docs/demo/uncontrolled.md
@@ -1,2 +1,8 @@
-## uncontrolled
-
+---
+title: animation
+nav:
+ title: Demo
+ path: /demo
+---
+
+
diff --git a/docs/index.md b/docs/index.md
new file mode 100644
index 000000000..68783ad9a
--- /dev/null
+++ b/docs/index.md
@@ -0,0 +1,8 @@
+---
+hero:
+ title: rc-picker
+ description: React picker component
+---
+
+
+
diff --git a/now.json b/now.json
index a748936d7..5a7e57a63 100644
--- a/now.json
+++ b/now.json
@@ -5,7 +5,7 @@
{
"src": "package.json",
"use": "@now/static-build",
- "config": { "distDir": ".doc" }
+ "config": { "distDir": "dist" }
}
],
"routes": [{ "src": "/(.*)", "dest": "/dist/$1" }]
diff --git a/package.json b/package.json
index 12e551e90..8685bc67c 100644
--- a/package.json
+++ b/package.json
@@ -13,8 +13,7 @@
"assets/*.css",
"assets/*.less",
"es",
- "lib",
- "dist"
+ "lib"
],
"homepage": "https://react-component.github.io/picker",
"repository": {
@@ -57,7 +56,7 @@
"cross-env": "^7.0.2",
"date-fns": "2.x",
"dayjs": "1.x",
- "dumi": "^1.1.37",
+ "dumi": "^2.1.15",
"eslint": "~7.32.0",
"eslint-plugin-eslint-comments": "^3.1.2",
"eslint-plugin-jest": "^26.8.2",
diff --git a/tsconfig.json b/tsconfig.json
index de6f93690..573fdcc8f 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -9,8 +9,9 @@
"esModuleInterop": true,
"paths": {
"@/*": ["src/*"],
- "@@/*": ["src/.umi/*"],
- "rc-picker": ["src/index.ts"]
+ "@@/*": [".dumi/tmp/*"],
+ "rc-picker": ["src/index.tsx"]
}
- }
+ },
+ "include": [".dumi/**/*", ".dumirc.ts", "**/*.ts", "**/*.tsx"]
}