From 3c63aa0d26878b057da58a98ba51aef8de9ebc6e 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, 22 Jul 2023 14:29:24 +0800 Subject: [PATCH] chore: update dumi 1.x => 2.x --- .dumirc.ts | 9 +++++++++ .gitignore | 6 +++++- .umirc.ts | 19 ------------------- docs/demo/auto-adjust-dropdown.md | 10 ++++++++-- docs/demo/combobox.md | 10 ++++++++-- docs/demo/controlled.md | 10 ++++++++-- docs/demo/custom-icon.md | 10 ++++++++-- docs/demo/custom-selector.md | 10 ++++++++-- docs/demo/custom-tags.md | 10 ++++++++-- docs/demo/dropdownRender.md | 10 ++++++++-- docs/demo/email.md | 10 ++++++++-- docs/demo/filterSort.md | 10 ++++++++-- docs/demo/force-suggest.md | 10 ++++++++-- docs/demo/getPopupContainer.md | 10 ++++++++-- docs/demo/loading.md | 10 ++++++++-- docs/demo/mul-suggest.md | 10 ++++++++-- docs/demo/mul-tag-suggest.md | 8 +++++++- docs/demo/multiple-readonly.md | 10 ++++++++-- docs/demo/multiple.md | 10 ++++++++-- docs/demo/optgroup.md | 10 ++++++++-- docs/demo/optionFilterProp.md | 10 ++++++++-- docs/demo/optionLabelProp.md | 10 ++++++++-- docs/demo/single-animation.md | 10 ++++++++-- docs/demo/single.md | 10 ++++++++-- docs/demo/singleFieldNames.md | 10 ++++++++-- docs/demo/suggest.md | 10 ++++++++-- docs/demo/tags.md | 10 ++++++++-- docs/demo/update-option.md | 10 ++++++++-- docs/index.md | 8 ++++++++ now.json | 2 +- package.json | 2 +- tsconfig.json | 2 +- 32 files changed, 224 insertions(+), 72 deletions(-) create mode 100644 .dumirc.ts delete mode 100644 .umirc.ts create mode 100644 docs/index.md diff --git a/.dumirc.ts b/.dumirc.ts new file mode 100644 index 000000000..cc7fe090a --- /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: 'Select', + logo: 'https://avatars0.githubusercontent.com/u/9441414?s=200&v=4', + }, +}); diff --git a/.gitignore b/.gitignore index 68d284393..557432b3e 100644 --- a/.gitignore +++ b/.gitignore @@ -39,4 +39,8 @@ tsconfig.test.json .storybook storybook/index.js .doc -.umi \ No newline at end of file +.umi + +# 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 30754d85f..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-select', - 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/auto-adjust-dropdown.md b/docs/demo/auto-adjust-dropdown.md index 51edadc96..040945d89 100644 --- a/docs/demo/auto-adjust-dropdown.md +++ b/docs/demo/auto-adjust-dropdown.md @@ -1,2 +1,8 @@ -## auto-adjust-dropdown - +--- +title: auto-adjust-dropdown +nav: + title: Demo + path: /demo +--- + + diff --git a/docs/demo/combobox.md b/docs/demo/combobox.md index 5f9a56cb4..74f6db9f5 100644 --- a/docs/demo/combobox.md +++ b/docs/demo/combobox.md @@ -1,2 +1,8 @@ -## combobox - +--- +title: combobox +nav: + title: Demo + path: /demo +--- + + diff --git a/docs/demo/controlled.md b/docs/demo/controlled.md index d71f23aa4..93806bdc7 100644 --- a/docs/demo/controlled.md +++ b/docs/demo/controlled.md @@ -1,2 +1,8 @@ -## controlled - +--- +title: controlled +nav: + title: Demo + path: /demo +--- + + diff --git a/docs/demo/custom-icon.md b/docs/demo/custom-icon.md index cce7a80f6..860ecf1d2 100644 --- a/docs/demo/custom-icon.md +++ b/docs/demo/custom-icon.md @@ -1,2 +1,8 @@ -## custom-icon - +--- +title: custom-icon +nav: + title: Demo + path: /demo +--- + + diff --git a/docs/demo/custom-selector.md b/docs/demo/custom-selector.md index 9f519682a..8d9b91344 100644 --- a/docs/demo/custom-selector.md +++ b/docs/demo/custom-selector.md @@ -1,2 +1,8 @@ -## custom-selector - +--- +title: custom-selector +nav: + title: Demo + path: /demo +--- + + diff --git a/docs/demo/custom-tags.md b/docs/demo/custom-tags.md index 83108553a..dc210c142 100644 --- a/docs/demo/custom-tags.md +++ b/docs/demo/custom-tags.md @@ -1,2 +1,8 @@ -## custom-tags - +--- +title: custom-tags +nav: + title: Demo + path: /demo +--- + + diff --git a/docs/demo/dropdownRender.md b/docs/demo/dropdownRender.md index af9e80060..0821a4a00 100644 --- a/docs/demo/dropdownRender.md +++ b/docs/demo/dropdownRender.md @@ -1,2 +1,8 @@ -## dropdownRender - +--- +title: dropdownRender +nav: + title: Demo + path: /demo +--- + + diff --git a/docs/demo/email.md b/docs/demo/email.md index 27ddccc1b..09981e128 100644 --- a/docs/demo/email.md +++ b/docs/demo/email.md @@ -1,2 +1,8 @@ -## email - +--- +title: email +nav: + title: Demo + path: /demo +--- + + diff --git a/docs/demo/filterSort.md b/docs/demo/filterSort.md index 8cb57d50a..520870244 100644 --- a/docs/demo/filterSort.md +++ b/docs/demo/filterSort.md @@ -1,2 +1,8 @@ -## filterSort - +--- +title: filterSort +nav: + title: Demo + path: /demo +--- + + diff --git a/docs/demo/force-suggest.md b/docs/demo/force-suggest.md index 9167f3db2..1739b0401 100644 --- a/docs/demo/force-suggest.md +++ b/docs/demo/force-suggest.md @@ -1,2 +1,8 @@ -## force-suggest - +--- +title: force-suggest +nav: + title: Demo + path: /demo +--- + + diff --git a/docs/demo/getPopupContainer.md b/docs/demo/getPopupContainer.md index 2b14eb447..99ae89c17 100644 --- a/docs/demo/getPopupContainer.md +++ b/docs/demo/getPopupContainer.md @@ -1,2 +1,8 @@ -## getPopupContainer - +--- +title: getPopupContainer +nav: + title: Demo + path: /demo +--- + + diff --git a/docs/demo/loading.md b/docs/demo/loading.md index a992d2bc7..73d6caec3 100644 --- a/docs/demo/loading.md +++ b/docs/demo/loading.md @@ -1,2 +1,8 @@ -## loading - +--- +title: loading +nav: + title: Demo + path: /demo +--- + + diff --git a/docs/demo/mul-suggest.md b/docs/demo/mul-suggest.md index a3e146c6b..42f1eda1a 100644 --- a/docs/demo/mul-suggest.md +++ b/docs/demo/mul-suggest.md @@ -1,2 +1,8 @@ -## mul-suggest - +--- +title: mul-suggest +nav: + title: Demo + path: /demo +--- + + diff --git a/docs/demo/mul-tag-suggest.md b/docs/demo/mul-tag-suggest.md index 7864dcbfc..8647d9ad2 100644 --- a/docs/demo/mul-tag-suggest.md +++ b/docs/demo/mul-tag-suggest.md @@ -1,2 +1,8 @@ -## mul-tag-suggest +--- +title: mul-tag-suggest +nav: + title: Demo + path: /demo +--- + diff --git a/docs/demo/multiple-readonly.md b/docs/demo/multiple-readonly.md index a114e47dc..43fa5f348 100644 --- a/docs/demo/multiple-readonly.md +++ b/docs/demo/multiple-readonly.md @@ -1,2 +1,8 @@ -## multiple-readonly - +--- +title: multiple-readonly +nav: + title: Demo + path: /demo +--- + + diff --git a/docs/demo/multiple.md b/docs/demo/multiple.md index 8cc051631..8cbb6d647 100644 --- a/docs/demo/multiple.md +++ b/docs/demo/multiple.md @@ -1,2 +1,8 @@ -## multiple - +--- +title: multiple +nav: + title: Demo + path: /demo +--- + + diff --git a/docs/demo/optgroup.md b/docs/demo/optgroup.md index e60c9a7ff..834e60975 100644 --- a/docs/demo/optgroup.md +++ b/docs/demo/optgroup.md @@ -1,2 +1,8 @@ -## optgroup - +--- +title: optgroup +nav: + title: Demo + path: /demo +--- + + diff --git a/docs/demo/optionFilterProp.md b/docs/demo/optionFilterProp.md index 78fa9ff47..62280da7a 100644 --- a/docs/demo/optionFilterProp.md +++ b/docs/demo/optionFilterProp.md @@ -1,2 +1,8 @@ -## optionFilterProp - +--- +title: optionFilterProp +nav: + title: Demo + path: /demo +--- + + diff --git a/docs/demo/optionLabelProp.md b/docs/demo/optionLabelProp.md index a71c118dc..2d226427b 100644 --- a/docs/demo/optionLabelProp.md +++ b/docs/demo/optionLabelProp.md @@ -1,2 +1,8 @@ -## optionLabelProp - +--- +title: optionLabelProp +nav: + title: Demo + path: /demo +--- + + diff --git a/docs/demo/single-animation.md b/docs/demo/single-animation.md index 6a3f7a062..401470b09 100644 --- a/docs/demo/single-animation.md +++ b/docs/demo/single-animation.md @@ -1,2 +1,8 @@ -## single-animation - +--- +title: single-animation +nav: + title: Demo + path: /demo +--- + + diff --git a/docs/demo/single.md b/docs/demo/single.md index 3d61c43b8..d1e4fe9d0 100644 --- a/docs/demo/single.md +++ b/docs/demo/single.md @@ -1,2 +1,8 @@ -## single - +--- +title: single +nav: + title: Demo + path: /demo +--- + + diff --git a/docs/demo/singleFieldNames.md b/docs/demo/singleFieldNames.md index 0e6e8dc46..488081254 100644 --- a/docs/demo/singleFieldNames.md +++ b/docs/demo/singleFieldNames.md @@ -1,2 +1,8 @@ -## singleFieldNames - +--- +title: singleFieldNames +nav: + title: Demo + path: /demo +--- + + diff --git a/docs/demo/suggest.md b/docs/demo/suggest.md index 840ce1836..521ae3b18 100644 --- a/docs/demo/suggest.md +++ b/docs/demo/suggest.md @@ -1,2 +1,8 @@ -## suggest - +--- +title: suggest +nav: + title: Demo + path: /demo +--- + + diff --git a/docs/demo/tags.md b/docs/demo/tags.md index 30d09d48f..02bae62d0 100644 --- a/docs/demo/tags.md +++ b/docs/demo/tags.md @@ -1,2 +1,8 @@ -## tags - +--- +title: tags +nav: + title: Demo + path: /demo +--- + + diff --git a/docs/demo/update-option.md b/docs/demo/update-option.md index 04c211dde..e9e3e9f49 100644 --- a/docs/demo/update-option.md +++ b/docs/demo/update-option.md @@ -1,2 +1,8 @@ -## update-option - +--- +title: update-option +nav: + title: Demo + path: /demo +--- + + diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 000000000..7458f9997 --- /dev/null +++ b/docs/index.md @@ -0,0 +1,8 @@ +--- +hero: + title: rc-select + description: React Select component +--- + + + diff --git a/now.json b/now.json index 1a2d15cf4..f86ec0062 100644 --- a/now.json +++ b/now.json @@ -5,7 +5,7 @@ { "src": "package.json", "use": "@now/static-build", - "config": { "distDir": ".doc" } + "config": { "distDir": "dist" } } ] } diff --git a/package.json b/package.json index dcca9d421..02d1343fe 100644 --- a/package.json +++ b/package.json @@ -60,7 +60,7 @@ "@types/react": "^17.0.15", "@types/react-dom": "^17.0.3", "cross-env": "^7.0.0", - "dumi": "^1.1.32", + "dumi": "^2.2.1", "enzyme": "^3.3.0", "enzyme-adapter-react-16": "^1.15.7", "enzyme-to-json": "^3.4.0", diff --git a/tsconfig.json b/tsconfig.json index cf3a49748..79763baf0 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -9,7 +9,7 @@ "esModuleInterop": true, "paths": { "@/*": ["src/*"], - "@@/*": ["src/.umi/*"], + "@@/*": [".dumi/tmp/*"], "rc-select": ["src/index.ts"] } }