From eda3dca21358d3fbf9c2991c3bc57e31841583df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BA=A2=E6=9E=9C=E6=B1=81?= Date: Tue, 24 Oct 2023 10:26:57 +0800 Subject: [PATCH] chore: bump dumi@2.2.13 (#988) * chore: bump dumi@2.2.13 * chore: remove include * chore: clean code * chore: bump typescript@5.2.2 * ci: update node version * ci: update node 18 * ci: fix script * ci: fix yml --- .dumirc.ts | 9 +++++++++ .github/workflows/main.yml | 14 +++++++------- .gitignore | 7 ++++--- 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 | 10 ++++++++-- 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/scroll-loading.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 | 7 +++++++ now.json | 6 ++++-- package.json | 7 ++++--- tsconfig.json | 14 ++++++++++---- 33 files changed, 253 insertions(+), 71 deletions(-) create mode 100644 .dumirc.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/.github/workflows/main.yml b/.github/workflows/main.yml index cc5fc111a..8dfa0e0dc 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -2,9 +2,9 @@ name: CI on: push: - branches: [ master ] + branches: [master] pull_request: - branches: [ master ] + branches: [master] jobs: setup: @@ -15,7 +15,7 @@ jobs: - uses: actions/setup-node@v1 with: - node-version: '12' + node-version: '18' - name: cache package-lock.json uses: actions/cache@v2 @@ -24,7 +24,7 @@ jobs: key: lock-${{ github.sha }} - name: create package-lock.json - run: npm i --package-lock-only + run: npm i --package-lock-only --ignore-scripts - name: hack for singe file run: | @@ -43,7 +43,7 @@ jobs: - name: install if: steps.node_modules_cache_id.outputs.cache-hit != 'true' run: npm ci - + lint: runs-on: ubuntu-latest steps: @@ -69,7 +69,7 @@ jobs: run: npm run tsc needs: setup - + compile: runs-on: ubuntu-latest steps: @@ -92,7 +92,7 @@ jobs: run: npm run compile needs: setup - + coverage: runs-on: ubuntu-latest steps: diff --git a/.gitignore b/.gitignore index 68d284393..e6b43584f 100644 --- a/.gitignore +++ b/.gitignore @@ -36,7 +36,8 @@ src/*.map tslint.json tsconfig.test.json .prettierignore -.storybook -storybook/index.js .doc -.umi \ No newline at end of file +.umi +.dumi/tmp +.dumi/tmp-test +.dumi/tmp-production \ 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..f018d3d4f 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/scroll-loading.md b/docs/demo/scroll-loading.md index 0358bd371..5b7ffc9e3 100644 --- a/docs/demo/scroll-loading.md +++ b/docs/demo/scroll-loading.md @@ -1,2 +1,8 @@ -## scroll loading - +--- +title: scroll loading +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..16fa9cb4a --- /dev/null +++ b/docs/index.md @@ -0,0 +1,7 @@ +--- +hero: + title: rc-select + description: React Select Component +--- + + diff --git a/now.json b/now.json index 1a2d15cf4..9340a6875 100644 --- a/now.json +++ b/now.json @@ -5,7 +5,9 @@ { "src": "package.json", "use": "@now/static-build", - "config": { "distDir": ".doc" } + "config": { + "distDir": "dist" + } } ] -} +} \ No newline at end of file diff --git a/package.json b/package.json index 136160640..06279073b 100644 --- a/package.json +++ b/package.json @@ -32,6 +32,7 @@ "scripts": { "start": "dumi dev", "build": "dumi build", + "prepare": "dumi setup", "compile": "father build", "prepublishOnly": "npm run compile && np --yolo --no-publish", "lint": "eslint src/ docs/examples/ --ext .tsx,.ts,.jsx,.js", @@ -61,7 +62,7 @@ "@types/react-dom": "^17.0.3", "babel-jest": "^29.6.1", "cross-env": "^7.0.0", - "dumi": "^1.1.32", + "dumi": "^2.2.13", "enzyme": "^3.3.0", "enzyme-adapter-react-16": "^1.15.7", "enzyme-to-json": "^3.4.0", @@ -73,6 +74,6 @@ "querystring": "^0.2.1", "rc-dialog": "^9.0.0", "rc-test": "^7.0.9", - "typescript": "^4.2.3" + "typescript": "^5.2.2" } -} +} \ No newline at end of file diff --git a/tsconfig.json b/tsconfig.json index cf3a49748..520ce4b8d 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -8,9 +8,15 @@ "skipLibCheck": true, "esModuleInterop": true, "paths": { - "@/*": ["src/*"], - "@@/*": ["src/.umi/*"], - "rc-select": ["src/index.ts"] - } + "@/*": [ + "src/*" + ], + "@@/*": [ + ".dumi/tmp/*" + ], + "rc-select": [ + "src/index.ts" + ] + }, } } \ No newline at end of file