Skip to content

Commit

Permalink
chore: bump dumi@2.x.x && father 4.x.x (#255)
Browse files Browse the repository at this point in the history
* chore: bump dumi@2.x.x && father 4.x.x

* chore: use rc-test
  • Loading branch information
DBSDs authored Nov 30, 2023
1 parent facd7be commit 1d2b39d
Show file tree
Hide file tree
Showing 15 changed files with 82 additions and 53 deletions.
12 changes: 6 additions & 6 deletions .umirc.ts → .dumirc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
import { defineConfig } from 'dumi';

export default defineConfig({
title: 'rc-progress',
favicon:
'https://avatars0.githubusercontent.com/u/9441414?s=200&v=4',
logo:
'https://avatars0.githubusercontent.com/u/9441414?s=200&v=4',
favicons: ['https://avatars0.githubusercontent.com/u/9441414?s=200&v=4'],
themeConfig: {
name: 'rc-progress',
logo: 'https://avatars0.githubusercontent.com/u/9441414?s=200&v=4',
},
outputPath: '.doc',
exportStatic: {},
styles: [
Expand All @@ -15,5 +15,5 @@ export default defineConfig({
width: auto !important;
}
`,
]
],
});
9 changes: 0 additions & 9 deletions .fatherrc.js

This file was deleted.

5 changes: 5 additions & 0 deletions .fatherrc.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { defineConfig } from 'father';

export default defineConfig({
plugins: ['@rc-component/father-plugin'],
});
14 changes: 7 additions & 7 deletions .github/workflows/react-component-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: CI

on:
push:
branches: [ master ]
branches: [master]
pull_request:
branches: [ master ]
branches: [master]

jobs:
setup:
Expand All @@ -15,7 +15,7 @@ jobs:

- uses: actions/setup-node@v1
with:
node-version: '12'
node-version: '18'

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

- name: create package-lock.json
run: npm i --package-lock-only
run: npm i --package-lock-only --ignore-scripts

- name: hack for singe file
run: |
Expand All @@ -43,7 +43,7 @@ jobs:
- name: install
if: steps.node_modules_cache_id.outputs.cache-hit != 'true'
run: npm ci

lint:
runs-on: ubuntu-latest
steps:
Expand All @@ -66,7 +66,7 @@ jobs:
run: npm run lint

needs: setup

compile:
runs-on: ubuntu-latest
steps:
Expand All @@ -89,7 +89,7 @@ jobs:
run: npm run compile

needs: setup

coverage:
runs-on: ubuntu-latest
steps:
Expand Down
8 changes: 4 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ package-lock.json
.storybook
.doc

# umi
.umi
.umi-production
.umi-test
# dumi
.dumi/tmp
.dumi/tmp-test
.dumi/tmp-production
.env.local
9 changes: 7 additions & 2 deletions docs/demo/fast-progress.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## fast-progress
---
title: fast-progress
nav:
title: Demo
path: /demo
---

<code src="../examples/fast-progress.tsx">
<code src="../examples/fast-progress.tsx"></code>
9 changes: 7 additions & 2 deletions docs/demo/gap.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## gap
---
title: gap
nav:
title: Demo
path: /demo
---

<code src="../examples/gap.tsx">
<code src="../examples/gap.tsx"></code>
9 changes: 7 additions & 2 deletions docs/demo/gradient-circle.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## gradient-circle
---
title: gradient-circle
nav:
title: Demo
path: /demo
---

<code src="../examples/gradient-circle.tsx">
<code src="../examples/gradient-circle.tsx"></code>
9 changes: 7 additions & 2 deletions docs/demo/simple.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## simple
---
title: simple
nav:
title: Demo
path: /demo
---

<code src="../examples/simple.tsx">
<code src="../examples/simple.tsx"></code>
9 changes: 7 additions & 2 deletions docs/demo/steps.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## steps
---
title: steps
nav:
title: Demo
path: /demo
---

<code src="../examples/steps.tsx">
<code src="../examples/steps.tsx"></code>
4 changes: 3 additions & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
---
title: rc-progress
hero:
title: rc-progress
description: React Progress Component
---

<embed src="../README.md"></embed>
22 changes: 12 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,12 @@
"docs:build": "dumi build",
"docs:deploy": "gh-pages -d docs-dist",
"compile": "father build",
"prepare": "dumi setup",
"gh-pages": "npm run build && father doc deploy",
"prepublishOnly": "npm run compile && np --yolo --no-publish",
"lint": "eslint src/ --ext .ts,.tsx,.jsx,.js",
"prettier": "prettier --write \"**/*.{ts,tsx,js,jsx,json,md}\"",
"test": "father test",
"test": "rc-test",
"tsc": "tsc --noEmit",
"coverage": "father test --coverage",
"now-build": "npm run docs:build"
Expand All @@ -47,26 +48,27 @@
"rc-util": "^5.16.1"
},
"devDependencies": {
"@rc-component/father-plugin": "^1.0.0",
"@testing-library/react": "^12.1.5",
"@types/classnames": "^2.2.9",
"@types/jest": "^29.4.0",
"@types/keyv": "3.1.4",
"@types/react": "^18.0.9",
"@types/react-dom": "^18.0.3",
"@umijs/fabric": "^2.0.0",
"@wojtekmaj/enzyme-adapter-react-17": "^0.6.7",
"@umijs/fabric": "^3.0.0",
"cross-env": "^7.0.0",
"dumi": "^1.1.0",
"dumi": "^2.0.0",
"enzyme": "^3.1.1",
"enzyme-adapter-react-16": "^1.0.1",
"enzyme-adapter-react-16": "^1.15.6",
"enzyme-to-json": "^3.1.2",
"eslint": "^7.1.0",
"father": "^2.29.6",
"father": "^4.0.0",
"glob": "^8.0.1",
"np": "^7.2.0",
"prettier": "^2.1.1",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"typescript": "^4.0.2"
"rc-test": "^7.0.15",
"react": "^16.0.0",
"react-dom": "^16.0.0",
"typescript": "^5.0.0"
}
}
}
9 changes: 7 additions & 2 deletions update-content.js → script/update-content.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,14 @@ paths.forEach(path => {
const name = path.split('/').pop().split('.')[0];
fs.writeFile(
`./docs/demo/${name}.md`,
`## ${name}
`---
title: ${name}
nav:
title: Demo
path: /demo
---
<code src="../examples/${name}.tsx">
<code src="../examples/${name}.tsx"></code>
`,
'utf8',
function(error) {
Expand Down
2 changes: 1 addition & 1 deletion tests/setup.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
global.requestAnimationFrame = (cb) => setTimeout(cb, 0);

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

Enzyme.configure({ adapter: new Adapter() });
5 changes: 2 additions & 3 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@

{
"compilerOptions": {
"target": "esnext",
"moduleResolution": "node",
"baseUrl": "./",
"jsx": "preserve",
"jsx": "react",
"declaration": true,
"skipLibCheck": true,
"esModuleInterop": true,
"paths": {
"@/*": ["src/*"],
"@@/*": ["src/.umi/*"],
"@@/*": [".dumi/tmp/*"],
"rc-progress": ["src/index.ts"]
}
}
Expand Down

0 comments on commit 1d2b39d

Please sign in to comment.