Skip to content

Commit 1d2b39d

Browse files
authored
chore: bump [email protected] && father 4.x.x (#255)
* chore: bump [email protected] && father 4.x.x * chore: use rc-test
1 parent facd7be commit 1d2b39d

15 files changed

+82
-53
lines changed

.umirc.ts .dumirc.ts

+6-6
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
import { defineConfig } from 'dumi';
33

44
export default defineConfig({
5-
title: 'rc-progress',
6-
favicon:
7-
'https://avatars0.githubusercontent.com/u/9441414?s=200&v=4',
8-
logo:
9-
'https://avatars0.githubusercontent.com/u/9441414?s=200&v=4',
5+
favicons: ['https://avatars0.githubusercontent.com/u/9441414?s=200&v=4'],
6+
themeConfig: {
7+
name: 'rc-progress',
8+
logo: 'https://avatars0.githubusercontent.com/u/9441414?s=200&v=4',
9+
},
1010
outputPath: '.doc',
1111
exportStatic: {},
1212
styles: [
@@ -15,5 +15,5 @@ export default defineConfig({
1515
width: auto !important;
1616
}
1717
`,
18-
]
18+
],
1919
});

.fatherrc.js

-9
This file was deleted.

.fatherrc.ts

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import { defineConfig } from 'father';
2+
3+
export default defineConfig({
4+
plugins: ['@rc-component/father-plugin'],
5+
});

.github/workflows/react-component-ci.yml

+7-7
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: CI
22

33
on:
44
push:
5-
branches: [ master ]
5+
branches: [master]
66
pull_request:
7-
branches: [ master ]
7+
branches: [master]
88

99
jobs:
1010
setup:
@@ -15,7 +15,7 @@ jobs:
1515

1616
- uses: actions/setup-node@v1
1717
with:
18-
node-version: '12'
18+
node-version: '18'
1919

2020
- name: cache package-lock.json
2121
uses: actions/cache@v2
@@ -24,7 +24,7 @@ jobs:
2424
key: lock-${{ github.sha }}
2525

2626
- name: create package-lock.json
27-
run: npm i --package-lock-only
27+
run: npm i --package-lock-only --ignore-scripts
2828

2929
- name: hack for singe file
3030
run: |
@@ -43,7 +43,7 @@ jobs:
4343
- name: install
4444
if: steps.node_modules_cache_id.outputs.cache-hit != 'true'
4545
run: npm ci
46-
46+
4747
lint:
4848
runs-on: ubuntu-latest
4949
steps:
@@ -66,7 +66,7 @@ jobs:
6666
run: npm run lint
6767

6868
needs: setup
69-
69+
7070
compile:
7171
runs-on: ubuntu-latest
7272
steps:
@@ -89,7 +89,7 @@ jobs:
8989
run: npm run compile
9090

9191
needs: setup
92-
92+
9393
coverage:
9494
runs-on: ubuntu-latest
9595
steps:

.gitignore

+4-4
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ package-lock.json
3232
.storybook
3333
.doc
3434

35-
# umi
36-
.umi
37-
.umi-production
38-
.umi-test
35+
# dumi
36+
.dumi/tmp
37+
.dumi/tmp-test
38+
.dumi/tmp-production
3939
.env.local

docs/demo/fast-progress.md

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1-
## fast-progress
1+
---
2+
title: fast-progress
3+
nav:
4+
title: Demo
5+
path: /demo
6+
---
27

3-
<code src="../examples/fast-progress.tsx">
8+
<code src="../examples/fast-progress.tsx"></code>

docs/demo/gap.md

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1-
## gap
1+
---
2+
title: gap
3+
nav:
4+
title: Demo
5+
path: /demo
6+
---
27

3-
<code src="../examples/gap.tsx">
8+
<code src="../examples/gap.tsx"></code>

docs/demo/gradient-circle.md

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1-
## gradient-circle
1+
---
2+
title: gradient-circle
3+
nav:
4+
title: Demo
5+
path: /demo
6+
---
27

3-
<code src="../examples/gradient-circle.tsx">
8+
<code src="../examples/gradient-circle.tsx"></code>

docs/demo/simple.md

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1-
## simple
1+
---
2+
title: simple
3+
nav:
4+
title: Demo
5+
path: /demo
6+
---
27

3-
<code src="../examples/simple.tsx">
8+
<code src="../examples/simple.tsx"></code>

docs/demo/steps.md

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1-
## steps
1+
---
2+
title: steps
3+
nav:
4+
title: Demo
5+
path: /demo
6+
---
27

3-
<code src="../examples/steps.tsx">
8+
<code src="../examples/steps.tsx"></code>

docs/index.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
---
2-
title: rc-progress
2+
hero:
3+
title: rc-progress
4+
description: React Progress Component
35
---
46

57
<embed src="../README.md"></embed>

package.json

+12-10
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,12 @@
2828
"docs:build": "dumi build",
2929
"docs:deploy": "gh-pages -d docs-dist",
3030
"compile": "father build",
31+
"prepare": "dumi setup",
3132
"gh-pages": "npm run build && father doc deploy",
3233
"prepublishOnly": "npm run compile && np --yolo --no-publish",
3334
"lint": "eslint src/ --ext .ts,.tsx,.jsx,.js",
3435
"prettier": "prettier --write \"**/*.{ts,tsx,js,jsx,json,md}\"",
35-
"test": "father test",
36+
"test": "rc-test",
3637
"tsc": "tsc --noEmit",
3738
"coverage": "father test --coverage",
3839
"now-build": "npm run docs:build"
@@ -47,26 +48,27 @@
4748
"rc-util": "^5.16.1"
4849
},
4950
"devDependencies": {
51+
"@rc-component/father-plugin": "^1.0.0",
5052
"@testing-library/react": "^12.1.5",
5153
"@types/classnames": "^2.2.9",
5254
"@types/jest": "^29.4.0",
5355
"@types/keyv": "3.1.4",
5456
"@types/react": "^18.0.9",
5557
"@types/react-dom": "^18.0.3",
56-
"@umijs/fabric": "^2.0.0",
57-
"@wojtekmaj/enzyme-adapter-react-17": "^0.6.7",
58+
"@umijs/fabric": "^3.0.0",
5859
"cross-env": "^7.0.0",
59-
"dumi": "^1.1.0",
60+
"dumi": "^2.0.0",
6061
"enzyme": "^3.1.1",
61-
"enzyme-adapter-react-16": "^1.0.1",
62+
"enzyme-adapter-react-16": "^1.15.6",
6263
"enzyme-to-json": "^3.1.2",
6364
"eslint": "^7.1.0",
64-
"father": "^2.29.6",
65+
"father": "^4.0.0",
6566
"glob": "^8.0.1",
6667
"np": "^7.2.0",
6768
"prettier": "^2.1.1",
68-
"react": "^17.0.2",
69-
"react-dom": "^17.0.2",
70-
"typescript": "^4.0.2"
69+
"rc-test": "^7.0.15",
70+
"react": "^16.0.0",
71+
"react-dom": "^16.0.0",
72+
"typescript": "^5.0.0"
7173
}
72-
}
74+
}

update-content.js script/update-content.js

+7-2
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,14 @@ paths.forEach(path => {
1313
const name = path.split('/').pop().split('.')[0];
1414
fs.writeFile(
1515
`./docs/demo/${name}.md`,
16-
`## ${name}
16+
`---
17+
title: ${name}
18+
nav:
19+
title: Demo
20+
path: /demo
21+
---
1722
18-
<code src="../examples/${name}.tsx">
23+
<code src="../examples/${name}.tsx"></code>
1924
`,
2025
'utf8',
2126
function(error) {

tests/setup.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
global.requestAnimationFrame = (cb) => setTimeout(cb, 0);
22

33
const Enzyme = require('enzyme');
4-
const Adapter = require('@wojtekmaj/enzyme-adapter-react-17');
4+
const Adapter = require('enzyme-adapter-react-16');
55

66
Enzyme.configure({ adapter: new Adapter() });

tsconfig.json

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
1-
21
{
32
"compilerOptions": {
43
"target": "esnext",
54
"moduleResolution": "node",
65
"baseUrl": "./",
7-
"jsx": "preserve",
6+
"jsx": "react",
87
"declaration": true,
98
"skipLibCheck": true,
109
"esModuleInterop": true,
1110
"paths": {
1211
"@/*": ["src/*"],
13-
"@@/*": ["src/.umi/*"],
12+
"@@/*": [".dumi/tmp/*"],
1413
"rc-progress": ["src/index.ts"]
1514
}
1615
}

0 commit comments

Comments
 (0)