From 9167dae2d69de01a0303c96d068b8621307b2adc Mon Sep 17 00:00:00 2001 From: xrkffgg Date: Tue, 6 Apr 2021 15:21:05 +0800 Subject: [PATCH 1/3] chore: update dumi config --- .umirc.ts | 23 ++++++++++++++++++++--- README.md | 10 ++-------- docs/demo/base.md | 3 +++ docs/demo/blink.md | 3 +++ docs/demo/fill-width.md | 3 +++ docs/index.md | 5 +++++ examples/basic.tsx | 2 +- examples/blink.tsx | 2 +- examples/fill-width.tsx | 2 +- now.json | 2 +- package.json | 2 +- tsconfig.json | 2 +- 12 files changed, 42 insertions(+), 17 deletions(-) create mode 100644 docs/demo/base.md create mode 100644 docs/demo/blink.md create mode 100644 docs/demo/fill-width.md create mode 100644 docs/index.md diff --git a/.umirc.ts b/.umirc.ts index db0f06a..8aa693d 100644 --- a/.umirc.ts +++ b/.umirc.ts @@ -1,3 +1,20 @@ -export default { - exportStatic: {} -} +import { defineConfig } from 'dumi'; + +export default defineConfig({ + title: 'rc-overflow', + favicon: + 'https://avatars0.githubusercontent.com/u/9441414?s=200&v=4', + logo: + 'https://avatars0.githubusercontent.com/u/9441414?s=200&v=4', + exportStatic: {}, + resolve: { + examples: ['none'], + }, + styles: [ + ` + .markdown table { + width: auto !important; + } + `, + ] +}); diff --git a/README.md b/README.md index 6f9e93a..eaea826 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,6 @@ # rc-overflow 🐾 -[![NPM version][npm-image]][npm-url] -[![npm download][download-image]][download-url] -[![build status][github-actions-image]][github-actions-url] -[![Codecov][codecov-image]][codecov-url] -[![Dependencies][david-image]](david-url) -[![DevDependencies][david-dev-image]][david-dev-url] -[![bundle size][bundlephobia-image]][bundlephobia-url] +[![NPM version][npm-image]][npm-url] [![dumi](https://img.shields.io/badge/docs%20by-dumi-blue?style=flat-square)](https://github.com/umijs/dumi) [![npm download][download-image]][download-url] [![build status][github-actions-image]][github-actions-url] [![Codecov][codecov-image]][codecov-url] [![Dependencies][david-image]](david-url) [![DevDependencies][david-dev-image]][david-dev-url] [![bundle size][bundlephobia-image]][bundlephobia-url] [npm-image]: http://img.shields.io/npm/v/rc-overflow.svg?style=flat-square [npm-url]: http://npmjs.org/package/rc-overflow @@ -35,7 +29,7 @@ https://react-component.github.io/overflow/ ## Usage -```tsx +```ts // TODO ``` diff --git a/docs/demo/base.md b/docs/demo/base.md new file mode 100644 index 0000000..3d1c229 --- /dev/null +++ b/docs/demo/base.md @@ -0,0 +1,3 @@ +## base + + diff --git a/docs/demo/blink.md b/docs/demo/blink.md new file mode 100644 index 0000000..7362231 --- /dev/null +++ b/docs/demo/blink.md @@ -0,0 +1,3 @@ +## blink + + diff --git a/docs/demo/fill-width.md b/docs/demo/fill-width.md new file mode 100644 index 0000000..acf87dd --- /dev/null +++ b/docs/demo/fill-width.md @@ -0,0 +1,3 @@ +## fill-width + + diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 0000000..ea8ad53 --- /dev/null +++ b/docs/index.md @@ -0,0 +1,5 @@ +--- +title: rc-overflow +--- + + diff --git a/examples/basic.tsx b/examples/basic.tsx index c572396..aa7a9a5 100644 --- a/examples/basic.tsx +++ b/examples/basic.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import Overflow from '../src'; +import Overflow from 'rc-overflow'; import '../assets/index.less'; import './common.less'; diff --git a/examples/blink.tsx b/examples/blink.tsx index af93a56..b7d70f9 100644 --- a/examples/blink.tsx +++ b/examples/blink.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import Overflow from '../src'; +import Overflow from 'rc-overflow'; import '../assets/index.less'; import './common.less'; diff --git a/examples/fill-width.tsx b/examples/fill-width.tsx index 4b29ab3..5212dd7 100644 --- a/examples/fill-width.tsx +++ b/examples/fill-width.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import Overflow from '../src'; +import Overflow from 'rc-overflow'; import '../assets/index.less'; import './common.less'; diff --git a/now.json b/now.json index cb24b24..01a4be8 100644 --- a/now.json +++ b/now.json @@ -5,7 +5,7 @@ { "src": "package.json", "use": "@now/static-build", - "config": { "distDir": "dist" } + "config": { "distDir": "docs-dist" } } ], "routes": [ diff --git a/package.json b/package.json index 0107aef..3ed3a85 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,7 @@ "@types/react-dom": "^16.9.10", "@umijs/fabric": "^2.0.8", "cross-env": "^7.0.2", - "dumi": "^1.0.38", + "dumi": "^1.1.10", "enzyme": "^3.0.0", "enzyme-adapter-react-16": "^1.0.1", "enzyme-to-json": "^3.4.0", diff --git a/tsconfig.json b/tsconfig.json index 499a039..1248088 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -10,7 +10,7 @@ "paths": { "@/*": ["src/*"], "@@/*": ["src/.umi/*"], - "rc-table": ["src/index.ts"] + "rc-overflow": ["src/index.tsx"] } } } \ No newline at end of file From b02340568ebaa5a3a40be15799f1896660532b07 Mon Sep 17 00:00:00 2001 From: xrkffgg Date: Tue, 6 Apr 2021 15:22:05 +0800 Subject: [PATCH 2/3] up --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index eaea826..765ce6d 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ Auto collapse box when overflow ## Live Demo -https://react-component.github.io/overflow/ +https://overflow-react-component.vercel.app/ ## Install From f4e0e5416d74cf99f070bfea496562c7d2ffdb35 Mon Sep 17 00:00:00 2001 From: xrkffgg Date: Tue, 6 Apr 2021 15:27:04 +0800 Subject: [PATCH 3/3] Update .umirc.ts --- .umirc.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/.umirc.ts b/.umirc.ts index 8aa693d..a15b3dd 100644 --- a/.umirc.ts +++ b/.umirc.ts @@ -7,6 +7,7 @@ export default defineConfig({ logo: 'https://avatars0.githubusercontent.com/u/9441414?s=200&v=4', exportStatic: {}, + outputPath: 'docs-dist', resolve: { examples: ['none'], },