Skip to content

Commit 68c003f

Browse files
committed
chore: standardize rc tooling and docs
1 parent 7b0a938 commit 68c003f

5 files changed

Lines changed: 73 additions & 29 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 ? '/slider/' : '/';
5-
const publicPath = process.env.GH_PAGES ? '/slider/' : '/';
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
@@ -53,6 +53,17 @@ export default () => (
5353

5454
Online preview: https://slider.react-component.vercel.app/
5555

56+
## Examples
57+
58+
Run the local dumi site:
59+
60+
```bash
61+
npm install
62+
npm start
63+
```
64+
65+
Then open `http://localhost:8000`.
66+
5667
## API
5768

5869
### Slider

README.zh-CN.md

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

5454
在线预览:https://slider.react-component.vercel.app/
5555

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

5869
### Slider

package.json

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -48,34 +48,34 @@
4848
},
4949
"devDependencies": {
5050
"@rc-component/father-plugin": "^2.2.0",
51-
"@rc-component/np": "^1.0.0",
51+
"@rc-component/np": "^1.0.4",
5252
"@rc-component/tooltip": "^1.2.1",
5353
"@rc-component/trigger": "^3.5.2",
5454
"@testing-library/dom": "^10.4.1",
55-
"@testing-library/jest-dom": "^6.1.5",
56-
"@testing-library/react": "^16.0.0",
57-
"@types/jest": "^29.5.1",
58-
"@types/node": "^22.5.0",
59-
"@types/react": "^18.2.42",
60-
"@types/react-dom": "^18.0.11",
55+
"@testing-library/jest-dom": "^6.9.1",
56+
"@testing-library/react": "^15.0.7",
57+
"@types/jest": "^29.5.14",
58+
"@types/node": "^26.0.1",
59+
"@types/react": "^18.3.31",
60+
"@types/react-dom": "^18.3.7",
6161
"@typescript-eslint/eslint-plugin": "^5.62.0",
6262
"@typescript-eslint/parser": "^5.62.0",
6363
"@umijs/fabric": "^4.0.1",
64-
"cross-env": "^7.0.0",
65-
"dumi": "^2.2.10",
66-
"eslint": "^8.54.0",
64+
"cross-env": "^10.1.0",
65+
"dumi": "^2.4.35",
66+
"eslint": "^8.57.1",
6767
"eslint-plugin-jest": "^27.9.0",
68-
"eslint-plugin-unicorn": "^54.0.0",
69-
"father": "^4.3.5",
68+
"eslint-plugin-unicorn": "^56.0.1",
69+
"father": "^4.6.23",
7070
"father-build": "^1.18.6",
71-
"gh-pages": "^6.1.0",
72-
"glob": "^7.1.6",
73-
"less": "^4.1.3",
74-
"rc-test": "^7.0.15",
75-
"react": "^18.0.0",
76-
"react-dom": "^18.0.0",
71+
"gh-pages": "^6.3.0",
72+
"glob": "^13.0.6",
73+
"less": "^4.6.7",
74+
"rc-test": "^7.1.3",
75+
"react": "^18.3.1",
76+
"react-dom": "^18.3.1",
7777
"regenerator-runtime": "^0.14.0",
78-
"typescript": "^5.1.6"
78+
"typescript": "^5.9.3"
7979
},
8080
"peerDependencies": {
8181
"react": ">=16.9.0",

tsconfig.json

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

0 commit comments

Comments
 (0)