Skip to content

Commit 100820e

Browse files
committed
chore: standardize rc tooling and docs
1 parent 983ba8b commit 100820e

7 files changed

Lines changed: 51 additions & 31 deletions

File tree

.dumirc.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
11
import { defineConfig } from 'dumi';
22

3+
const basePath = process.env.GH_PAGES ? '/tree-select/' : '/';
4+
const publicPath = basePath;
5+
36
export default defineConfig({
7+
outputPath: 'docs-dist',
48
favicons: ['https://avatars0.githubusercontent.com/u/9441414?s=200&v=4'],
59
themeConfig: {
610
name: 'tree-select',
711
logo: 'https://avatars0.githubusercontent.com/u/9441414?s=200&v=4',
812
},
913
exportStatic: {},
10-
base: '/',
11-
publicPath: '/',
14+
base: basePath,
15+
publicPath,
1216
styles: [
1317
`
1418
.markdown table {

.github/workflows/surge-preview.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
with:
2828
surge_token: ${{ env.SURGE_TOKEN }}
2929
github_token: ${{ secrets.GITHUB_TOKEN }}
30-
dist: dist
30+
dist: docs-dist
3131
failOnError: false
3232
setCommitStatus: false
3333
- name: Skip Surge preview

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,14 @@ export default () => <TreeSelect treeData={treeData} placeholder="Select a node"
5555

5656
## Examples
5757

58+
Run the local dumi site:
59+
5860
```bash
5961
npm install
6062
npm start
6163
```
6264

63-
Open <http://localhost:8000/examples/> locally, or visit the online example:
64-
<https://tree-select-react-component.vercel.app/>.
65+
Then open `http://localhost:8000`.
6566

6667
## API
6768

README.zh-CN.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,14 @@ export default () => <TreeSelect treeData={treeData} placeholder="Select a node"
5555

5656
## 示例
5757

58+
运行本地 dumi 站点:
59+
5860
```bash
5961
npm install
6062
npm start
6163
```
6264

63-
本地打开 <http://localhost:8000/examples/>,或访问在线示例:<https://tree-select-react-component.vercel.app/>
65+
然后打开 `http://localhost:8000`
6466

6567
## API
6668

package.json

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -52,32 +52,32 @@
5252
"@rc-component/dialog": "^1.2.0",
5353
"@rc-component/father-plugin": "^2.2.0",
5454
"@rc-component/form": "^1.4.0",
55-
"@rc-component/np": "^1.0.3",
55+
"@rc-component/np": "^1.0.4",
5656
"@rc-component/trigger": "^3.0.0",
5757
"@rc-component/virtual-list": "^1.0.1",
58-
"@testing-library/react": "^16.0.0",
59-
"@types/jest": "^29.5.13",
60-
"@types/node": "^22.7.5",
61-
"@types/react": "^18.3.11",
62-
"@types/react-dom": "^18.0.0",
63-
"@types/warning": "^3.0.3",
58+
"@testing-library/react": "^15.0.7",
59+
"@types/jest": "^29.5.14",
60+
"@types/node": "^26.0.1",
61+
"@types/react": "^18.3.31",
62+
"@types/react-dom": "^18.3.7",
63+
"@types/warning": "^3.0.4",
6464
"@typescript-eslint/eslint-plugin": "^5.62.0",
6565
"@typescript-eslint/parser": "^5.62.0",
6666
"@umijs/fabric": "^4.0.1",
67-
"cross-env": "^7.0.3",
68-
"dumi": "^2.4.12",
67+
"cross-env": "^10.1.0",
68+
"dumi": "^2.4.35",
6969
"eslint": "^8.57.1",
7070
"eslint-plugin-jest": "^27.9.0",
71-
"eslint-plugin-unicorn": "^56.0.0",
72-
"father": "^4.5.0",
73-
"glob": "^11.0.0",
74-
"husky": "^9.1.6",
75-
"lint-staged": "^15.2.10",
76-
"prettier": "^3.3.3",
77-
"rc-test": "^7.1.1",
78-
"react": "^18.0.0",
79-
"react-dom": "^18.0.0",
80-
"typescript": "^5.6.3"
71+
"eslint-plugin-unicorn": "^56.0.1",
72+
"father": "^4.6.23",
73+
"glob": "^13.0.6",
74+
"husky": "^9.1.7",
75+
"lint-staged": "^16.4.0",
76+
"prettier": "^3.9.0",
77+
"rc-test": "^7.1.3",
78+
"react": "^18.3.1",
79+
"react-dom": "^18.3.1",
80+
"typescript": "^5.9.3"
8181
},
8282
"peerDependencies": {
8383
"react": "*",

tsconfig.json

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,23 @@
88
"skipLibCheck": true,
99
"esModuleInterop": true,
1010
"paths": {
11-
"@/*": ["src/*"],
12-
"@@/*": [".dumi/tmp/*"],
13-
"@rc-component/tree-select": ["src/index.tsx"]
14-
}
11+
"@/*": [
12+
"src/*"
13+
],
14+
"@@/*": [
15+
".dumi/tmp/*"
16+
],
17+
"@rc-component/tree-select": [
18+
"src/index.tsx"
19+
]
20+
},
21+
"ignoreDeprecations": "5.0"
1522
},
16-
"include": [".dumirc.ts", ".fatherrc.ts", "src", "tests", "examples"]
23+
"include": [
24+
".dumirc.ts",
25+
".fatherrc.ts",
26+
"src",
27+
"tests",
28+
"examples"
29+
]
1730
}

vercel.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
"framework": "umijs",
33
"installCommand": "npm install",
44
"buildCommand": "npm run build",
5-
"outputDirectory": "dist"
5+
"outputDirectory": "docs-dist"
66
}

0 commit comments

Comments
 (0)