Skip to content

Commit 918507b

Browse files
committed
chore: standardize rc tooling and docs
1 parent 75efcea commit 918507b

7 files changed

Lines changed: 44 additions & 28 deletions

File tree

.dumirc.ts

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

4+
const basePath = process.env.GH_PAGES ? '/dropdown/' : '/';
5+
const publicPath = basePath;
6+
47
export default defineConfig({
58
favicons: ['https://avatars0.githubusercontent.com/u/9441414?s=200&v=4'],
69
themeConfig: {
710
name: 'rc-dropdown',
811
logo: 'https://avatars0.githubusercontent.com/u/9441414?s=200&v=4',
912
},
10-
outputPath: '.docs',
13+
outputPath: 'docs-dist',
14+
base: basePath,
15+
publicPath,
1116
exportStatic: {},
1217
styles: [
1318
`

.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: .docs
37+
dist: docs-dist
3838
failOnError: false
3939
setCommitStatus: false
4040
- name: Skip Surge preview

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ export default function App() {
5656

5757
## Examples
5858

59+
Run the local dumi site:
60+
5961
```bash
6062
npm install
6163
npm start

README.zh-CN.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ export default function App() {
5656

5757
## 示例
5858

59+
运行本地 dumi 站点:
60+
5961
```bash
6062
npm install
6163
npm start

package.json

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -51,29 +51,29 @@
5151
"devDependencies": {
5252
"@rc-component/father-plugin": "^2.2.0",
5353
"@rc-component/menu": "^1.0.0",
54-
"@rc-component/np": "^1.0.3",
54+
"@rc-component/np": "^1.0.4",
5555
"@rc-component/resize-observer": "^1.0.0",
56-
"@testing-library/jest-dom": "^5.16.5",
57-
"@testing-library/react": "^14.0.0",
58-
"@types/jest": "^29.0.0",
59-
"@types/node": "^24.5.2",
60-
"@types/react": "^18.0.0",
61-
"@types/react-dom": "^18.0.0",
62-
"@types/warning": "^3.0.0",
63-
"@umijs/fabric": "^3.0.0",
64-
"dumi": "^2.0.0",
65-
"eslint": "^7.18.0",
66-
"father": "^4.0.0",
67-
"glob": "^10.0.0",
68-
"husky": "^8.0.3",
69-
"jest-environment-jsdom": "^29.5.0",
70-
"less": "^4.1.1",
71-
"lint-staged": "^13.2.1",
72-
"prettier": "^2.8.7",
73-
"rc-test": "^7.0.14",
74-
"react": "^18.0.0",
75-
"react-dom": "^18.0.0",
76-
"typescript": "^5.0.0"
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",
62+
"@types/warning": "^3.0.4",
63+
"@umijs/fabric": "^4.0.1",
64+
"dumi": "^2.4.35",
65+
"eslint": "^8.57.1",
66+
"father": "^4.6.23",
67+
"glob": "^13.0.6",
68+
"husky": "^9.1.7",
69+
"jest-environment-jsdom": "^29.7.0",
70+
"less": "^4.6.7",
71+
"lint-staged": "^16.4.0",
72+
"prettier": "^3.9.0",
73+
"rc-test": "^7.1.3",
74+
"react": "^18.3.1",
75+
"react-dom": "^18.3.1",
76+
"typescript": "^5.9.3"
7777
},
7878
"peerDependencies": {
7979
"react": ">=16.11.0",

tsconfig.json

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,17 @@
99
"jsx": "react",
1010
"skipLibCheck": true,
1111
"paths": {
12-
"@@/*": [".dumi/tmp/*"]
13-
}
12+
"@@/*": [
13+
".dumi/tmp/*"
14+
]
15+
},
16+
"ignoreDeprecations": "5.0"
1417
},
15-
"include": ["./src", "./tests", "./typings/"],
18+
"include": [
19+
"./src",
20+
"./tests",
21+
"./typings/"
22+
],
1623
"typings": "./typings/index.d.ts",
1724
"exclude": [
1825
"node_modules",

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": ".docs"
5+
"outputDirectory": "docs-dist"
66
}

0 commit comments

Comments
 (0)