Skip to content

Commit d1fab52

Browse files
committed
chore: standardize rc tooling and docs
1 parent b84bea7 commit d1fab52

5 files changed

Lines changed: 42 additions & 34 deletions

File tree

.dumirc.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
// more config: https://d.umijs.org/config
22
import { defineConfig } from 'dumi';
33

4-
const name = 'mentions';
5-
const isProdSite = process.env.GH_PAGES === '1';
6-
7-
const basePath = isProdSite ? `/${name}/` : '/';
8-
const publicPath = isProdSite ? `/${name}/` : '/';
4+
const basePath = process.env.GH_PAGES ? '/mentions/' : '/';
5+
const publicPath = basePath;
96

107
export default defineConfig({
118
favicons: ['https://avatars0.githubusercontent.com/u/9441414?s=200&v=4'],

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,14 +68,14 @@ Import the styles from `assets/index.less` or the compiled CSS generated by `npm
6868

6969
## Examples
7070

71-
Run the examples locally:
71+
Run the local dumi site:
7272

7373
```bash
7474
npm install
7575
npm start
7676
```
7777

78-
The demo site includes basic usage, dynamic suggestions, custom filtering, multiple prefixes, textarea behavior, and scroll callbacks.
78+
Then open `http://localhost:8000`.
7979

8080
## API
8181

README.zh-CN.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,14 +68,14 @@ export default () => (
6868

6969
## 示例
7070

71-
本地运行示例
71+
运行本地 dumi 站点
7272

7373
```bash
7474
npm install
7575
npm start
7676
```
7777

78-
示例站点包含基础用法、动态建议、自定义过滤、多前缀、文本域行为和滚动回调
78+
然后打开 `http://localhost:8000`
7979

8080
## API
8181

package.json

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -54,30 +54,30 @@
5454
},
5555
"devDependencies": {
5656
"@rc-component/father-plugin": "^2.2.0",
57-
"@rc-component/np": "^1.0.3",
58-
"@testing-library/jest-dom": "^6.4.6",
59-
"@testing-library/react": "^16.0.0",
57+
"@rc-component/np": "^1.0.4",
58+
"@testing-library/jest-dom": "^6.9.1",
59+
"@testing-library/react": "^15.0.7",
6060
"@typescript-eslint/eslint-plugin": "^5.62.0",
6161
"@typescript-eslint/parser": "^5.62.0",
62-
"@types/node": "^24.5.2",
63-
"@types/react": "^18.0.8",
64-
"@types/react-dom": "^18.0.3",
65-
"@types/warning": "^3.0.0",
66-
"@umijs/fabric": "^3.0.0",
67-
"cross-env": "^7.0.0",
68-
"dumi": "^2.0.18",
69-
"eslint": "^8.0.0",
62+
"@types/node": "^26.0.1",
63+
"@types/react": "^18.3.31",
64+
"@types/react-dom": "^18.3.7",
65+
"@types/warning": "^3.0.4",
66+
"@umijs/fabric": "^4.0.1",
67+
"cross-env": "^10.1.0",
68+
"dumi": "^2.4.35",
69+
"eslint": "^8.57.1",
7070
"eslint-plugin-jest": "^27.9.0",
7171
"eslint-plugin-unicorn": "^56.0.1",
72-
"father": "^4.0.0",
73-
"gh-pages": "^5.0.0",
74-
"husky": "^9.1.6",
75-
"lint-staged": "^15.2.7",
76-
"prettier": "^3.3.2",
77-
"rc-test": "^7.0.14",
78-
"react": "^18.0.0",
79-
"react-dom": "^18.0.0",
80-
"typescript": "~5.8.3"
72+
"father": "^4.6.23",
73+
"gh-pages": "^6.3.0",
74+
"husky": "^9.1.7",
75+
"lint-staged": "^16.4.0",
76+
"prettier": "^3.9.0",
77+
"rc-test": "^7.1.3",
78+
"react": "^18.3.1",
79+
"react-dom": "^18.3.1",
80+
"typescript": "^5.9.3"
8181
},
8282
"peerDependencies": {
8383
"react": ">=16.9.0",

tsconfig.json

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,21 @@
88
"skipLibCheck": true,
99
"esModuleInterop": true,
1010
"paths": {
11-
"@/*": ["src/*"],
12-
"@@/*": [".dumi/tmp/*"],
13-
"@rc-component/mentions": ["src/index.ts"]
14-
}
11+
"@/*": [
12+
"src/*"
13+
],
14+
"@@/*": [
15+
".dumi/tmp/*"
16+
],
17+
"@rc-component/mentions": [
18+
"src/index.ts"
19+
]
20+
},
21+
"ignoreDeprecations": "5.0"
1522
},
16-
"include": [".dumirc.ts", "**/*.ts", "**/*.tsx"]
23+
"include": [
24+
".dumirc.ts",
25+
"**/*.ts",
26+
"**/*.tsx"
27+
]
1728
}

0 commit comments

Comments
 (0)