Skip to content

Commit c092a17

Browse files
committed
chore: standardize rc tooling and docs
1 parent c1df5f8 commit c092a17

7 files changed

Lines changed: 49 additions & 32 deletions

File tree

.dumirc.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
import { defineConfig } from 'dumi';
22

3+
const basePath = process.env.GH_PAGES ? '/checkbox/' : '/';
4+
const publicPath = basePath;
5+
36
export default defineConfig({
7+
outputPath: 'docs-dist',
8+
base: basePath,
9+
publicPath,
410
themeConfig: {
511
name: 'Checkbox',
612
},

.github/workflows/surge-preview.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
with:
3131
surge_token: ${{ env.SURGE_TOKEN }}
3232
github_token: ${{ secrets.GITHUB_TOKEN }}
33-
dist: dist
33+
dist: docs-dist
3434
failOnError: false
3535
setCommitStatus: false
3636
- name: Skip Surge preview

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,15 +64,15 @@ export default function App() {
6464

6565
## Examples
6666

67+
Run the local dumi site:
68+
6769
```bash
6870
npm install
6971
npm start
7072
```
7173

7274
Then open `http://localhost:8000`.
7375

74-
Online demo: https://react-component.github.io/checkbox/
75-
7676
## API
7777

7878
### Checkbox

README.zh-CN.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,15 +64,15 @@ export default function App() {
6464

6565
## 示例
6666

67+
运行本地 dumi 站点:
68+
6769
```bash
6870
npm install
6971
npm start
7072
```
7173

7274
然后打开 `http://localhost:8000`
7375

74-
在线演示: https://react-component.github.io/checkbox/
75-
7676
## API
7777

7878
### Checkbox

package.json

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -52,29 +52,29 @@
5252
},
5353
"devDependencies": {
5454
"@rc-component/father-plugin": "^2.2.0",
55-
"@rc-component/np": "^1.0.0",
56-
"@testing-library/jest-dom": "^6.1.5",
57-
"@testing-library/react": "^14.1.2",
58-
"@types/jest": "^29.2.4",
59-
"@types/node": "^24.5.2",
60-
"@types/react": "^18.0.26",
61-
"@types/react-dom": "^18.0.9",
55+
"@rc-component/np": "^1.0.4",
56+
"@testing-library/jest-dom": "^6.9.1",
57+
"@testing-library/react": "^15.0.7",
58+
"@types/jest": "^29.5.14",
59+
"@types/node": "^26.0.1",
60+
"@types/react": "^18.3.31",
61+
"@types/react-dom": "^18.3.7",
6262
"@umijs/fabric": "^4.0.1",
63-
"@umijs/test": "^4.0.34",
64-
"dumi": "^2.0.12",
65-
"eslint": "^8.55.0",
66-
"eslint-plugin-jest": "^27.6.0",
67-
"eslint-plugin-unicorn": "^50.0.1",
68-
"father": "^4.1.1",
69-
"husky": "9.0.5",
70-
"jest": "^29.3.1",
71-
"jest-environment-jsdom": "^29.3.1",
72-
"less": "^4.2.0",
73-
"lint-staged": "^15.1.0",
74-
"react": "^18.2.0",
75-
"react-dom": "^18.2.0",
63+
"@umijs/test": "^4.6.68",
64+
"dumi": "^2.4.35",
65+
"eslint": "^8.57.1",
66+
"eslint-plugin-jest": "^27.9.0",
67+
"eslint-plugin-unicorn": "^56.0.1",
68+
"father": "^4.6.23",
69+
"husky": "^9.1.7",
70+
"jest": "^29.7.0",
71+
"jest-environment-jsdom": "^29.7.0",
72+
"less": "^4.6.7",
73+
"lint-staged": "^16.4.0",
74+
"react": "^18.3.1",
75+
"react-dom": "^18.3.1",
7676
"ts-node": "^10.9.1",
77-
"typescript": "^5.2.2"
77+
"typescript": "^5.9.3"
7878
},
7979
"peerDependencies": {
8080
"react": ">=16.9.0",

tsconfig.json

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

vercel.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
"framework": "umijs",
33
"installCommand": "npm install",
44
"buildCommand": "npm run build",
5-
"outputDirectory": "dist"
5+
"outputDirectory": "docs-dist"
66
}

0 commit comments

Comments
 (0)