From 10bc3f133605729841c46a3857f73fec47d199d7 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: Tue, 10 Jan 2023 19:25:03 +0800 Subject: [PATCH 1/2] chore: dumi 1.x -> 2.x --- .dumirc.ts | 14 ++++++++++++++ .gitignore | 7 ++++++- .umirc.ts | 19 ------------------- docs/demo/characterRender.md | 9 +++++++-- docs/demo/simple.md | 9 +++++++-- docs/index.md | 4 +++- package.json | 2 +- tsconfig.json | 5 +++-- 8 files changed, 41 insertions(+), 28 deletions(-) create mode 100644 .dumirc.ts delete mode 100644 .umirc.ts diff --git a/.dumirc.ts b/.dumirc.ts new file mode 100644 index 0000000..4c4545f --- /dev/null +++ b/.dumirc.ts @@ -0,0 +1,14 @@ +import { defineConfig } from 'dumi'; +import path from 'path'; + +export default defineConfig({ + alias: { + 'rc-rate$': path.resolve('src'), + 'rc-rate/es': path.resolve('src'), + }, + favicons: ['https://avatars0.githubusercontent.com/u/9441414?s=200&v=4'], + themeConfig: { + name: 'Rate', + logo: 'https://avatars0.githubusercontent.com/u/9441414?s=200&v=4', + }, +}); diff --git a/.gitignore b/.gitignore index 43227e0..422f7e8 100755 --- a/.gitignore +++ b/.gitignore @@ -33,4 +33,9 @@ package-lock.json .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 832fbe9..0000000 --- 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-rate', - 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/demo/characterRender.md b/docs/demo/characterRender.md index a0b9723..d0f83d7 100644 --- a/docs/demo/characterRender.md +++ b/docs/demo/characterRender.md @@ -1,3 +1,8 @@ -## characterRender +--- +title: characterRender +nav: + title: Demo + path: /demo +--- - \ No newline at end of file + \ No newline at end of file diff --git a/docs/demo/simple.md b/docs/demo/simple.md index 51d9e8f..23f3e34 100644 --- a/docs/demo/simple.md +++ b/docs/demo/simple.md @@ -1,3 +1,8 @@ -## simple +--- +title: simple +nav: + title: Demo + path: /demo +--- - \ No newline at end of file + \ No newline at end of file diff --git a/docs/index.md b/docs/index.md index abfb6bb..aed1d13 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,5 +1,7 @@ --- -title: rc-rate +hero: + title: rc-rate + description: React Rate Component --- diff --git a/package.json b/package.json index 16e978f..b0ae814 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,7 @@ "@types/react-dom": "^16.9.0", "@umijs/fabric": "^2.0.0", "cross-env": "^7.0.0", - "dumi": "^1.1.0", + "dumi": "^2.1.2", "enzyme": "^3.1.1", "enzyme-adapter-react-16": "^1.0.1", "enzyme-to-json": "^3.1.2", diff --git a/tsconfig.json b/tsconfig.json index f353623..e2b649c 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -9,8 +9,9 @@ "esModuleInterop": true, "paths": { "@/*": ["src/*"], - "@@/*": ["src/.umi/*"], + "@@/*": [".dumi/tmp/*"], "rc-rate": ["src/index.tsx"] } - } + }, + "include": [".dumi/**/*", ".dumirc.ts", "./src/**/*.ts", "./src/**/*.tsx", "./docs/**/*.tsx"] } \ No newline at end of file From 7547d453217a9b85464e81a8035f52290f62be4e 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: Tue, 10 Jan 2023 19:57:23 +0800 Subject: [PATCH 2/2] chore: rename index.ts => index.tsx --- src/{index.ts => index.tsx} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename src/{index.ts => index.tsx} (100%) diff --git a/src/index.ts b/src/index.tsx similarity index 100% rename from src/index.ts rename to src/index.tsx