Skip to content

Commit febbe36

Browse files
committed
chore: standardize rc tooling and docs
1 parent 21d03ef commit febbe36

5 files changed

Lines changed: 66 additions & 24 deletions

File tree

.dumirc.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { defineConfig } from 'dumi';
22
import path from 'path';
33

44
const basePath = process.env.GH_PAGES ? '/upload/' : '/';
5-
const publicPath = process.env.GH_PAGES ? '/upload/' : '/';
5+
const publicPath = basePath;
66

77
export default defineConfig({
88
alias: {

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,17 @@ export default () => (
5151

5252
Online preview: https://upload.react-component.vercel.app/
5353

54+
## Examples
55+
56+
Run the local dumi site:
57+
58+
```bash
59+
npm install
60+
npm start
61+
```
62+
63+
Then open `http://localhost:8000`.
64+
5465
## API
5566

5667
### Upload

README.zh-CN.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,17 @@ export default () => (
5151

5252
在线预览:https://upload.react-component.vercel.app/
5353

54+
## 示例
55+
56+
运行本地 dumi 站点:
57+
58+
```bash
59+
npm install
60+
npm start
61+
```
62+
63+
然后打开 `http://localhost:8000`
64+
5465
## API
5566

5667
### Upload

package.json

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -46,25 +46,25 @@
4646
"devDependencies": {
4747
"@rc-component/father-plugin": "^2.2.0",
4848
"@rc-component/np": "^1.0.4",
49-
"@testing-library/jest-dom": "^6.1.5",
50-
"@testing-library/react": "^16.2.0",
51-
"@types/jest": "^30.0.0",
52-
"@types/node": "^25.0.1",
53-
"@types/react": "^19.2.2",
54-
"@types/react-dom": "^19.2.2",
49+
"@testing-library/jest-dom": "^6.9.1",
50+
"@testing-library/react": "^15.0.7",
51+
"@types/jest": "^29.5.14",
52+
"@types/node": "^26.0.1",
53+
"@types/react": "^18.3.31",
54+
"@types/react-dom": "^18.3.7",
5555
"@umijs/fabric": "^4.0.1",
5656
"axios": "^1.9.0",
57-
"cross-env": "^7.0.0",
58-
"dumi": "^2.1.0",
59-
"eslint": "^8.0.0",
60-
"father": "^4.0.0",
61-
"gh-pages": "^6.1.1",
62-
"rc-test": "^7.0.13",
63-
"react": "^18.0.0",
64-
"react-dom": "^18.0.0",
57+
"cross-env": "^10.1.0",
58+
"dumi": "^2.4.35",
59+
"eslint": "^8.57.1",
60+
"father": "^4.6.23",
61+
"gh-pages": "^6.3.0",
62+
"rc-test": "^7.1.3",
63+
"react": "^18.3.1",
64+
"react-dom": "^18.3.1",
6565
"regenerator-runtime": "^0.14.1",
6666
"sinon": "^9.0.2",
67-
"typescript": "^5.3.3"
67+
"typescript": "^5.9.3"
6868
},
6969
"peerDependencies": {
7070
"react": ">=16.9.0",

tsconfig.json

Lines changed: 28 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,33 @@
88
"skipLibCheck": true,
99
"esModuleInterop": true,
1010
"paths": {
11-
"@/*": ["src/*"],
12-
"@@/*": [".dumi/tmp/*"],
13-
"@rc-component/upload": ["src/index.ts"],
14-
"@rc-component/upload/es": ["src"],
15-
"@rc-component/upload/es/*": ["src/*"]
16-
}
11+
"@/*": [
12+
"src/*"
13+
],
14+
"@@/*": [
15+
".dumi/tmp/*"
16+
],
17+
"@rc-component/upload": [
18+
"src/index.ts"
19+
],
20+
"@rc-component/upload/es": [
21+
"src"
22+
],
23+
"@rc-component/upload/es/*": [
24+
"src/*"
25+
]
26+
},
27+
"ignoreDeprecations": "5.0"
1728
},
18-
"include": [".dumirc.ts", "src", "tests", "docs/examples"],
19-
"exclude": ["docs-dist", "lib", "es"]
29+
"include": [
30+
".dumirc.ts",
31+
"src",
32+
"tests",
33+
"docs/examples"
34+
],
35+
"exclude": [
36+
"docs-dist",
37+
"lib",
38+
"es"
39+
]
2040
}

0 commit comments

Comments
 (0)