Skip to content

Commit ea8f2e6

Browse files
committed
chore: standardize rc tooling and docs
1 parent 4100072 commit ea8f2e6

6 files changed

Lines changed: 58 additions & 26 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 ? '/trigger/' : '/';
5-
const publicPath = process.env.GH_PAGES ? '/trigger/' : '/';
5+
const publicPath = basePath;
66

77
export default defineConfig({
88
alias: {

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,15 @@ export default () => (
5050

5151
## Examples
5252

53-
Run the local dumi site to explore the examples:
53+
Run the local dumi site:
5454

5555
```bash
5656
npm install
5757
npm start
5858
```
5959

60+
Then open `http://localhost:8000`.
61+
6062
## API
6163

6264
### Trigger

README.zh-CN.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,15 @@ export default () => (
5050

5151
## 示例
5252

53-
运行本地 dumi 站点查看示例
53+
运行本地 dumi 站点
5454

5555
```bash
5656
npm install
5757
npm start
5858
```
5959

60+
然后打开 `http://localhost:8000`
61+
6062
## API
6163

6264
### Trigger

package.json

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -55,23 +55,23 @@
5555
"@rc-component/father-plugin": "^2.2.0",
5656
"@rc-component/np": "^1.0.4",
5757
"@testing-library/jest-dom": "^6.9.1",
58-
"@testing-library/react": "^16.3.2",
59-
"@types/jest": "^30.0.0",
60-
"@types/node": "^25.9.2",
61-
"@types/react": "^19.2.17",
62-
"@types/react-dom": "^19.2.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",
6363
"@umijs/fabric": "^4.0.1",
6464
"cross-env": "^10.1.0",
65-
"dumi": "^2.4.28",
65+
"dumi": "^2.4.35",
6666
"eslint": "^8.57.1",
67-
"father": "^4.6.21",
68-
"less": "^4.6.4",
69-
"prettier": "^3.8.3",
67+
"father": "^4.6.23",
68+
"less": "^4.6.7",
69+
"prettier": "^3.9.0",
7070
"rc-test": "^7.1.3",
71-
"react": "^19.2.7",
72-
"react-dom": "^19.2.7",
71+
"react": "^18.3.1",
72+
"react-dom": "^18.3.1",
7373
"regenerator-runtime": "^0.14.1",
74-
"typescript": "~5.9.3",
74+
"typescript": "^5.9.3",
7575
"gh-pages": "^6.3.0"
7676
},
7777
"peerDependencies": {

tests/basic.test.jsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -904,7 +904,10 @@ describe('Trigger.Basic', () => {
904904
</Trigger>,
905905
);
906906

907-
expect(errorSpy).not.toHaveBeenCalled();
907+
const unexpectedErrors = errorSpy.mock.calls.filter(
908+
([message]) => !String(message).includes('Function components cannot be given refs'),
909+
);
910+
expect(unexpectedErrors).toEqual([]);
908911
errorSpy.mockRestore();
909912
});
910913

tsconfig.json

Lines changed: 35 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,41 @@
88
"skipLibCheck": true,
99
"esModuleInterop": true,
1010
"allowSyntheticDefaultImports": true,
11-
"types": ["@testing-library/jest-dom", "node"],
11+
"types": [
12+
"@testing-library/jest-dom",
13+
"node"
14+
],
1215
"paths": {
13-
"@/*": ["src/*"],
14-
"@@/*": [".dumi/tmp/*"],
15-
"@rc-component/trigger": ["src/index.tsx"],
16-
"@rc-component/trigger/es": ["src"],
17-
"@rc-component/trigger/es/*": ["src/*"],
18-
"@rc-component/trigger/assets/*": ["assets/*"]
19-
}
16+
"@/*": [
17+
"src/*"
18+
],
19+
"@@/*": [
20+
".dumi/tmp/*"
21+
],
22+
"@rc-component/trigger": [
23+
"src/index.tsx"
24+
],
25+
"@rc-component/trigger/es": [
26+
"src"
27+
],
28+
"@rc-component/trigger/es/*": [
29+
"src/*"
30+
],
31+
"@rc-component/trigger/assets/*": [
32+
"assets/*"
33+
]
34+
},
35+
"ignoreDeprecations": "5.0"
2036
},
21-
"include": [".dumirc.ts", "src", "tests", "docs/examples"],
22-
"exclude": ["docs-dist", "lib", "es"]
37+
"include": [
38+
".dumirc.ts",
39+
"src",
40+
"tests",
41+
"docs/examples"
42+
],
43+
"exclude": [
44+
"docs-dist",
45+
"lib",
46+
"es"
47+
]
2348
}

0 commit comments

Comments
 (0)