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/src/index.ts b/src/index.tsx similarity index 100% rename from src/index.ts rename to src/index.tsx 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