Skip to content

Commit 5419342

Browse files
committed
chore: standardize rc tooling and docs
1 parent 2b13601 commit 5419342

5 files changed

Lines changed: 81 additions & 34 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 ? '/steps/' : '/';
5-
const publicPath = process.env.GH_PAGES ? '/steps/' : '/';
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
@@ -49,6 +49,17 @@ export default () => (
4949

5050
Online preview: https://steps.react-component.vercel.app/
5151

52+
## Examples
53+
54+
Run the local dumi site:
55+
56+
```bash
57+
npm install
58+
npm start
59+
```
60+
61+
Then open `http://localhost:8000`.
62+
5263
## API
5364

5465
### Steps

README.zh-CN.md

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

5050
在线预览:https://steps.react-component.vercel.app/
5151

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

5465
### Steps

package.json

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -50,30 +50,30 @@
5050
},
5151
"devDependencies": {
5252
"@rc-component/father-plugin": "^2.2.0",
53-
"@rc-component/np": "^1.0.0",
54-
"@testing-library/jest-dom": "^6.4.5",
55-
"@testing-library/react": "^15.0.6",
56-
"@types/jest": "^29.4.0",
57-
"@types/node": "^24.5.2",
58-
"@types/react": "^18.0.28",
59-
"@types/react-dom": "^18.0.11",
53+
"@rc-component/np": "^1.0.4",
54+
"@testing-library/jest-dom": "^6.9.1",
55+
"@testing-library/react": "^15.0.7",
56+
"@types/jest": "^29.5.14",
57+
"@types/node": "^26.0.1",
58+
"@types/react": "^18.3.31",
59+
"@types/react-dom": "^18.3.7",
6060
"@umijs/fabric": "^4.0.1",
61-
"dumi": "^2.0.0",
62-
"eslint": "^8.55.0",
63-
"eslint-plugin-jest": "^27.6.0",
64-
"eslint-plugin-unicorn": "^50.0.1",
65-
"father": "^4",
66-
"gh-pages": "^6.1.0",
67-
"glob": "^10.0.0",
68-
"husky": "^8.0.1",
69-
"less": "^4.1.3",
70-
"lint-staged": "^15.2.0",
71-
"prettier": "^3.1.0",
72-
"rc-test": "^7.0.9",
73-
"react": "^18.0.0",
74-
"react-dom": "^18.0.0",
75-
"typescript": "^5.0.0",
76-
"cross-env": "^7.0.0"
61+
"dumi": "^2.4.35",
62+
"eslint": "^8.57.1",
63+
"eslint-plugin-jest": "^27.9.0",
64+
"eslint-plugin-unicorn": "^56.0.1",
65+
"father": "^4.6.23",
66+
"gh-pages": "^6.3.0",
67+
"glob": "^13.0.6",
68+
"husky": "^9.1.7",
69+
"less": "^4.6.7",
70+
"lint-staged": "^16.4.0",
71+
"prettier": "^3.9.0",
72+
"rc-test": "^7.1.3",
73+
"react": "^18.3.1",
74+
"react-dom": "^18.3.1",
75+
"typescript": "^5.9.3",
76+
"cross-env": "^10.1.0"
7777
},
7878
"peerDependencies": {
7979
"react": ">=16.9.0",

tsconfig.json

Lines changed: 35 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,45 @@
33
"target": "esnext",
44
"moduleResolution": "node",
55
"baseUrl": "./",
6-
"lib": ["dom", "es2017"],
6+
"lib": [
7+
"dom",
8+
"es2017"
9+
],
710
"jsx": "preserve",
811
"declaration": true,
912
"skipLibCheck": true,
1013
"esModuleInterop": true,
1114
"paths": {
12-
"@/*": ["src/*"],
13-
"@@/*": [".dumi/tmp/*"],
14-
"@rc-component/steps": ["src/index.ts"],
15-
"@rc-component/steps/es": ["src"],
16-
"@rc-component/steps/es/*": ["src/*"],
17-
"@rc-component/steps/assets/*": ["assets/*"]
18-
}
15+
"@/*": [
16+
"src/*"
17+
],
18+
"@@/*": [
19+
".dumi/tmp/*"
20+
],
21+
"@rc-component/steps": [
22+
"src/index.ts"
23+
],
24+
"@rc-component/steps/es": [
25+
"src"
26+
],
27+
"@rc-component/steps/es/*": [
28+
"src/*"
29+
],
30+
"@rc-component/steps/assets/*": [
31+
"assets/*"
32+
]
33+
},
34+
"ignoreDeprecations": "5.0"
1935
},
20-
"include": [".dumirc.ts", "src", "tests", "docs/examples"],
21-
"exclude": ["docs-dist", "lib", "es"]
36+
"include": [
37+
".dumirc.ts",
38+
"src",
39+
"tests",
40+
"docs/examples"
41+
],
42+
"exclude": [
43+
"docs-dist",
44+
"lib",
45+
"es"
46+
]
2247
}

0 commit comments

Comments
 (0)