Skip to content

Commit

Permalink
docs: use father@4 & dumi@2 (#944)
Browse files Browse the repository at this point in the history
* chore: update dumi

* docs: update

* docs: now

* chore: now folder
  • Loading branch information
zombieJ committed Sep 21, 2023
1 parent 9d9fb1a commit 2c47708
Show file tree
Hide file tree
Showing 14 changed files with 71 additions and 63 deletions.
16 changes: 16 additions & 0 deletions .dumirc.ts
@@ -0,0 +1,16 @@
import { defineConfig } from 'dumi';
import path from 'path';

export default defineConfig({
alias: {
'rc-slider$': path.resolve('src'),
'rc-slider/es': path.resolve('src'),
},
mfsu: false,
favicons: ['https://avatars0.githubusercontent.com/u/9441414?s=200&v=4'],
themeConfig: {
name: 'Slider',
logo: 'https://avatars0.githubusercontent.com/u/9441414?s=200&v=4',
},
styles: [``],
});
14 changes: 5 additions & 9 deletions .fatherrc.js
@@ -1,9 +1,5 @@
export default {
cjs: 'babel',
esm: { type: 'babel', importLibToEs: true },
preCommit: {
eslint: true,
prettier: true,
},
runtimeHelpers: true,
};
import { defineConfig } from 'father';

export default defineConfig({
plugins: ['@rc-component/father-plugin'],
});
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -37,3 +37,4 @@ package-lock.json
.umi-production
.umi-test
.env.local
.dumi/
21 changes: 0 additions & 21 deletions .umirc.ts

This file was deleted.

9 changes: 7 additions & 2 deletions docs/demo/debug.md
@@ -1,3 +1,8 @@
## debug
---
title: Debug
nav:
title: Demo
path: /demo
---

<code src="../examples/debug.tsx">
<code src="../examples/debug.tsx"></code>
9 changes: 7 additions & 2 deletions docs/demo/handle.md
@@ -1,3 +1,8 @@
## handle
---
title: Handle
nav:
title: Demo
path: /demo
---

<code src="../examples/handle.tsx">
<code src="../examples/handle.tsx"></code>
9 changes: 7 additions & 2 deletions docs/demo/marks.md
@@ -1,3 +1,8 @@
## marks
---
title: Marks
nav:
title: Demo
path: /demo
---

<code src="../examples/marks.tsx">
<code src="../examples/marks.tsx"></code>
9 changes: 7 additions & 2 deletions docs/demo/range.md
@@ -1,3 +1,8 @@
## range
---
title: Range
nav:
title: Demo
path: /demo
---

<code src="../examples/range.tsx">
<code src="../examples/range.tsx"></code>
9 changes: 7 additions & 2 deletions docs/demo/slider.md
@@ -1,3 +1,8 @@
## slider
---
title: Slider
nav:
title: Demo
path: /demo
---

<code src="../examples/slider.tsx">
<code src="../examples/slider.tsx"></code>
9 changes: 7 additions & 2 deletions docs/demo/vertical.md
@@ -1,3 +1,8 @@
## vertical
---
title: Vertical
nav:
title: Demo
path: /demo
---

<code src="../examples/vertical.tsx">
<code src="../examples/vertical.tsx"></code>
1 change: 0 additions & 1 deletion jest.config.js
@@ -1,4 +1,3 @@
module.exports = {
setupFiles: ["./tests/setup.js"],
snapshotSerializers: [require.resolve("enzyme-to-json/serializer")]
};
5 changes: 1 addition & 4 deletions now.json
Expand Up @@ -5,10 +5,7 @@
{
"src": "package.json",
"use": "@now/static-build",
"config": { "distDir": ".doc" }
"config": { "distDir": "dist" }
}
],
"routes": [
{ "src": "/(.*)", "dest": "/dist/$1" }
]
}
13 changes: 6 additions & 7 deletions package.json
Expand Up @@ -40,8 +40,8 @@
"prepublishOnly": "npm run compile && np --yolo --no-publish",
"lint": "eslint src/ --ext .ts,.tsx,.jsx,.js,.md",
"prettier": "prettier --write \"**/*.{ts,tsx,js,jsx,json,md}\"",
"test": "father test",
"coverage": "father test --coverage",
"test": "rc-test",
"coverage": "rc-test --coverage",
"now-build": "npm run docs:build"
},
"peerDependencies": {
Expand All @@ -54,6 +54,7 @@
"rc-util": "^5.27.0"
},
"devDependencies": {
"@rc-component/father-plugin": "^1.0.2",
"@testing-library/jest-dom": "^5.16.2",
"@testing-library/react": "^12.1.3",
"@types/classnames": "^2.2.9",
Expand All @@ -62,17 +63,15 @@
"@types/react-dom": "^18.0.11",
"@umijs/fabric": "^2.0.0",
"cross-env": "^7.0.0",
"dumi": "^1.1.7",
"enzyme": "^3.1.0",
"enzyme-adapter-react-16": "^1.0.1",
"enzyme-to-json": "^3.1.2",
"dumi": "^2.2.10",
"eslint": "^7.1.0",
"father": "^2.22.0",
"father": "^4.3.5",
"father-build": "^1.18.6",
"gh-pages": "^3.1.0",
"glob": "^7.1.6",
"less": "^3.10.3",
"np": "^7.0.0",
"rc-test": "^7.0.15",
"rc-tooltip": "^5.0.1",
"rc-trigger": "^5.0.4",
"react": "^16.0.0",
Expand Down
9 changes: 0 additions & 9 deletions tests/setup.js
@@ -1,9 +0,0 @@
global.requestAnimationFrame = global.requestAnimationFrame || function _raf(cb) {
return setTimeout(cb, 0);
};
require('regenerator-runtime');

const Enzyme = require('enzyme');
const Adapter = require('enzyme-adapter-react-16');

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

1 comment on commit 2c47708

@vercel
Copy link

@vercel vercel bot commented on 2c47708 Sep 21, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.