diff --git a/.dumirc.ts b/.dumirc.ts new file mode 100644 index 00000000..f7a1213b --- /dev/null +++ b/.dumirc.ts @@ -0,0 +1,15 @@ +import { defineConfig } from 'dumi'; +import path from 'path'; + +export default defineConfig({ + alias: { + 'rc-tooltip$': path.resolve('src'), + 'rc-tooltip/es': path.resolve('src'), + }, + mfsu: false, + favicons: ['https://avatars0.githubusercontent.com/u/9441414?s=200&v=4'], + themeConfig: { + name: 'Tooltip', + logo: 'https://avatars0.githubusercontent.com/u/9441414?s=200&v=4', + }, +}); diff --git a/.gitignore b/.gitignore index 15f4631d..35fad322 100644 --- a/.gitignore +++ b/.gitignore @@ -35,4 +35,8 @@ 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 f75dbd21..00000000 --- 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-tooltip', - 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/arrowContent.md b/docs/demo/arrowContent.md index b1b21f09..e8013bd3 100644 --- a/docs/demo/arrowContent.md +++ b/docs/demo/arrowContent.md @@ -1,3 +1,8 @@ -## arrowContent +--- +title: arrowContent +nav: + title: Demo + path: /demo +--- - \ No newline at end of file + \ No newline at end of file diff --git a/docs/demo/formError.md b/docs/demo/formError.md index 51a3480d..e3bf2e8d 100644 --- a/docs/demo/formError.md +++ b/docs/demo/formError.md @@ -1,3 +1,8 @@ -## formError +--- +title: formError +nav: + title: Demo + path: /demo +--- - \ No newline at end of file + \ No newline at end of file diff --git a/docs/demo/onVisibleChange.md b/docs/demo/onVisibleChange.md index 989b373e..4f30b05a 100644 --- a/docs/demo/onVisibleChange.md +++ b/docs/demo/onVisibleChange.md @@ -1,3 +1,8 @@ -## onVisibleChange +--- +title: onVisibleChange +nav: + title: Demo + path: /demo +--- - \ No newline at end of file + \ No newline at end of file diff --git a/docs/demo/placement.md b/docs/demo/placement.md index e2952931..192ec92e 100644 --- a/docs/demo/placement.md +++ b/docs/demo/placement.md @@ -1,3 +1,8 @@ -## placement +--- +title: placement +nav: + title: Demo + path: /demo +--- - \ No newline at end of file + \ No newline at end of file diff --git a/docs/demo/showArrow.md b/docs/demo/showArrow.md index d4b4c420..7925fe57 100644 --- a/docs/demo/showArrow.md +++ b/docs/demo/showArrow.md @@ -1,3 +1,8 @@ -## showArrow +--- +title: showArrow +nav: + title: Demo + path: /demo +--- - + diff --git a/docs/demo/simple.md b/docs/demo/simple.md index 51d9e8f6..23f3e343 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 53a98a37..4c79a7b9 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,5 +1,8 @@ --- -title: rc-tooltip +hero: + title: rc-tooltip + description: React Tooltip --- + diff --git a/package.json b/package.json index 4ae08af6..de94828e 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ "@types/react-dom": "^16.9.2", "@types/warning": "^3.0.0", "cross-env": "^7.0.0", - "dumi": "^1.1.0", + "dumi": "^2.1.1", "enzyme": "^3.10.0", "enzyme-adapter-react-16": "^1.15.1", "enzyme-to-json": "^3.4.3", diff --git a/tsconfig.json b/tsconfig.json index e23fb377..eee6c53d 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -9,8 +9,9 @@ "esModuleInterop": true, "paths": { "@/*": ["src/*"], - "@@/*": ["src/.umi/*"], + "@@/*": [".dumi/tmp/*"], "rc-tooltip": ["src/index.tsx"] } - } + }, + "include": [".dumi/**/*", ".dumirc.ts", "./src/**/*.ts", "./src/**/*.tsx", "./docs/**/*.tsx"] }