Skip to content

Commit 87f1c6f

Browse files
committed
chore: standardize rc tooling and docs
1 parent 414ca40 commit 87f1c6f

7 files changed

Lines changed: 53 additions & 33 deletions

File tree

.dumirc.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22
import { defineConfig } from 'dumi';
33

44
const basePath = process.env.GH_PAGES ? '/progress/' : '/';
5-
const publicPath = process.env.GH_PAGES ? '/progress/' : '/';
5+
const publicPath = basePath;
66

77
export default defineConfig({
8+
outputPath: 'docs-dist',
89
favicons: ['https://avatars0.githubusercontent.com/u/9441414?s=200&v=4'],
910
themeConfig: {
1011
name: '@rc-component/progress',

.github/workflows/surge-preview.yml

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

README.md

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

5656
## Examples
5757

58-
Run the examples locally:
58+
Run the local dumi site:
5959

6060
```bash
6161
npm install
6262
npm start
6363
```
6464

65-
Online preview: https://progress.react-component.vercel.app/
65+
Then open `http://localhost:8000`.
6666

6767
## API
6868

README.zh-CN.md

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

5656
## 示例
5757

58-
本地运行示例
58+
运行本地 dumi 站点
5959

6060
```bash
6161
npm install
6262
npm start
6363
```
6464

65-
在线预览:https://progress.react-component.vercel.app/
65+
然后打开 `http://localhost:8000`
6666

6767
## API
6868

package.json

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"start": "dumi dev",
2828
"build": "npm run docs:build",
2929
"docs:build": "dumi build",
30-
"docs:deploy": "gh-pages -d dist",
30+
"docs:deploy": "gh-pages -d docs-dist",
3131
"deploy": "npm run gh-pages",
3232
"compile": "father build",
3333
"prepare": "dumi setup",
@@ -46,26 +46,26 @@
4646
"devDependencies": {
4747
"@rc-component/father-plugin": "^2.2.0",
4848
"@rc-component/np": "^1.0.4",
49-
"@testing-library/react": "^13.0.0",
50-
"@types/jest": "^29.4.0",
49+
"@testing-library/react": "^15.0.7",
50+
"@types/jest": "^29.5.14",
5151
"@types/keyv": "3.1.4",
52-
"@types/node": "^24.5.2",
53-
"@types/react": "^18.0.9",
54-
"@types/react-dom": "^18.0.3",
55-
"@umijs/fabric": "^3.0.0",
56-
"cross-env": "^7.0.0",
57-
"dumi": "^2.0.0",
58-
"eslint": "^8.57.0",
59-
"eslint-plugin-jest": "^27.6.0",
60-
"eslint-plugin-unicorn": "^50.0.1",
61-
"father": "^4.0.0",
62-
"gh-pages": "^6.1.0",
63-
"glob": "^8.0.1",
64-
"prettier": "^3.1.1",
65-
"rc-test": "^7.0.15",
66-
"react": "^18.0.0",
67-
"react-dom": "^18.0.0",
68-
"typescript": "^5.0.0"
52+
"@types/node": "^26.0.1",
53+
"@types/react": "^18.3.31",
54+
"@types/react-dom": "^18.3.7",
55+
"@umijs/fabric": "^4.0.1",
56+
"cross-env": "^10.1.0",
57+
"dumi": "^2.4.35",
58+
"eslint": "^8.57.1",
59+
"eslint-plugin-jest": "^27.9.0",
60+
"eslint-plugin-unicorn": "^56.0.1",
61+
"father": "^4.6.23",
62+
"gh-pages": "^6.3.0",
63+
"glob": "^13.0.6",
64+
"prettier": "^3.9.0",
65+
"rc-test": "^7.1.3",
66+
"react": "^18.3.1",
67+
"react-dom": "^18.3.1",
68+
"typescript": "^5.9.3"
6969
},
7070
"peerDependencies": {
7171
"react": ">=16.9.0",

tsconfig.json

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,30 @@
88
"skipLibCheck": true,
99
"esModuleInterop": true,
1010
"paths": {
11-
"@/*": ["src/*"],
12-
"@@/*": [".dumi/tmp/*"],
13-
"@rc-component/progress": ["src/index.ts"]
14-
}
11+
"@/*": [
12+
"src/*"
13+
],
14+
"@@/*": [
15+
".dumi/tmp/*"
16+
],
17+
"@rc-component/progress": [
18+
"src/index.ts"
19+
]
20+
},
21+
"ignoreDeprecations": "5.0"
1522
},
16-
"include": [".dumirc.ts", "src", "docs", "tests"],
17-
"exclude": ["node_modules", "lib", "es", "dist", "docs-dist", ".dumi"]
23+
"include": [
24+
".dumirc.ts",
25+
"src",
26+
"docs",
27+
"tests"
28+
],
29+
"exclude": [
30+
"node_modules",
31+
"lib",
32+
"es",
33+
"dist",
34+
"docs-dist",
35+
".dumi"
36+
]
1837
}

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)