Skip to content

Commit 36996c6

Browse files
committed
chore: standardize rc tooling and docs
1 parent de136d5 commit 36996c6

5 files changed

Lines changed: 72 additions & 28 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 ? '/tooltip/' : '/';
5-
const publicPath = process.env.GH_PAGES ? '/tooltip/' : '/';
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
@@ -44,6 +44,17 @@ export default () => (
4444

4545
Online preview: https://tooltip.react-component.vercel.app/
4646

47+
## Examples
48+
49+
Run the local dumi site:
50+
51+
```bash
52+
npm install
53+
npm start
54+
```
55+
56+
Then open `http://localhost:8000`.
57+
4758
## API
4859

4960
### Tooltip

README.zh-CN.md

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

4545
在线预览:https://tooltip.react-component.vercel.app/
4646

47+
## 示例
48+
49+
运行本地 dumi 站点:
50+
51+
```bash
52+
npm install
53+
npm start
54+
```
55+
56+
然后打开 `http://localhost:8000`
57+
4758
## API
4859

4960
### Tooltip

package.json

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -50,25 +50,25 @@
5050
},
5151
"devDependencies": {
5252
"@rc-component/father-plugin": "^2.2.0",
53-
"@rc-component/np": "^1.0.3",
53+
"@rc-component/np": "^1.0.4",
5454
"@testing-library/jest-dom": "^6.9.1",
55-
"@testing-library/react": "^16.3.0",
56-
"@types/jest": "^29.4.0",
57-
"@types/node": "^22.15.18",
58-
"@types/react": "^19.1.4",
59-
"@types/react-dom": "^19.1.5",
60-
"@types/warning": "^3.0.0",
61-
"dumi": "^2.2.13",
62-
"eslint": "^8.56.0",
63-
"father": "^4.0.0",
64-
"gh-pages": "^6.1.1",
65-
"less": "^4.1.1",
66-
"prettier": "^3.6.2",
67-
"rc-test": "^7.0.9",
68-
"react": "^19.1.0",
69-
"react-dom": "^19.1.0",
70-
"typescript": "^4.0.5",
71-
"cross-env": "^7.0.0"
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",
60+
"@types/warning": "^3.0.4",
61+
"dumi": "^2.4.35",
62+
"eslint": "^8.57.1",
63+
"father": "^4.6.23",
64+
"gh-pages": "^6.3.0",
65+
"less": "^4.6.7",
66+
"prettier": "^3.9.0",
67+
"rc-test": "^7.1.3",
68+
"react": "^18.3.1",
69+
"react-dom": "^18.3.1",
70+
"typescript": "^5.9.3",
71+
"cross-env": "^10.1.0"
7272
},
7373
"peerDependencies": {
7474
"react": ">=18.0.0",

tsconfig.json

Lines changed: 31 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,37 @@
77
"declaration": true,
88
"skipLibCheck": true,
99
"esModuleInterop": true,
10-
"types": ["@testing-library/jest-dom"],
10+
"types": [
11+
"@testing-library/jest-dom"
12+
],
1113
"paths": {
12-
"@/*": ["src/*"],
13-
"@@/*": [".dumi/tmp/*"],
14-
"@rc-component/tooltip": ["src/index.tsx"],
15-
"@rc-component/tooltip/es": ["src"],
16-
"@rc-component/tooltip/es/*": ["src/*"]
17-
}
14+
"@/*": [
15+
"src/*"
16+
],
17+
"@@/*": [
18+
".dumi/tmp/*"
19+
],
20+
"@rc-component/tooltip": [
21+
"src/index.tsx"
22+
],
23+
"@rc-component/tooltip/es": [
24+
"src"
25+
],
26+
"@rc-component/tooltip/es/*": [
27+
"src/*"
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)