-
-
Notifications
You must be signed in to change notification settings - Fork 234
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: upgrade to father 4 & dumi 2 (#626)
* chore: bump father * part test * test: more test case * test: more test case * test: rest test * chore: doc dest
- Loading branch information
Showing
27 changed files
with
460 additions
and
392 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { defineConfig } from 'dumi'; | ||
|
||
export default defineConfig({ | ||
themeConfig: { | ||
name: 'Tabs', | ||
}, | ||
mfsu: false, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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'], | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,3 +37,4 @@ package-lock.json | |
.umi-production | ||
.umi-test | ||
.env.local | ||
.dumi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
## animated | ||
--- | ||
title: Animated | ||
nav: | ||
title: Demo | ||
path: /demo | ||
--- | ||
|
||
<code src="../examples/animated.tsx"> | ||
<code src="../examples/animated.tsx"></code> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
## basic | ||
--- | ||
title: Basic | ||
nav: | ||
title: Demo | ||
path: /demo | ||
--- | ||
|
||
<code src="../examples/basic.tsx"> | ||
<code src="../examples/basic.tsx"></code> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
## editable | ||
--- | ||
title: Editable | ||
nav: | ||
title: Demo | ||
path: /demo | ||
--- | ||
|
||
<code src="../examples/editable.tsx"> | ||
<code src="../examples/editable.tsx"></code> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
## extra | ||
--- | ||
title: Extra | ||
nav: | ||
title: Demo | ||
path: /demo | ||
--- | ||
|
||
<code src="../examples/extra.tsx"> | ||
<code src="../examples/extra.tsx"></code> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
## mix | ||
--- | ||
title: Mix | ||
nav: | ||
title: Demo | ||
path: /demo | ||
--- | ||
|
||
<code src="../examples/mix.tsx"> | ||
<code src="../examples/mix.tsx"></code> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
## overflow | ||
--- | ||
title: Overflow | ||
nav: | ||
title: Demo | ||
path: /demo | ||
--- | ||
|
||
<code src="../examples/overflow.tsx"> | ||
<code src="../examples/overflow.tsx"></code> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
## position | ||
--- | ||
title: Position | ||
nav: | ||
title: Demo | ||
path: /demo | ||
--- | ||
|
||
<code src="../examples/position.tsx"> | ||
<code src="../examples/position.tsx"></code> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
## renderTabBar-dragable | ||
--- | ||
title: renderTabBar-dragable | ||
nav: | ||
title: Demo | ||
path: /demo | ||
--- | ||
|
||
<code src="../examples/renderTabBar-dragable.tsx"> | ||
<code src="../examples/renderTabBar-dragable.tsx"></code> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,10 @@ | ||
--- | ||
title: renderTabBar-sticky | ||
nav: | ||
title: Demo | ||
path: /demo | ||
--- | ||
|
||
## renderTabBar-sticky | ||
|
||
<code src="../examples/renderTabBar-sticky.tsx"> | ||
<code src="../examples/renderTabBar-sticky.tsx"></code> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
## renderTabBar-use-panes | ||
--- | ||
title: enderTabBar-use-panes | ||
nav: | ||
title: Demo | ||
path: /demo | ||
--- | ||
|
||
<code src="../examples/renderTabBar-use-panes.tsx"> | ||
<code src="../examples/renderTabBar-use-panes.tsx"></code> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,24 @@ | ||
// Copy from antd jest config file. We need compile `rc-resize-observer` | ||
const compileModules = [ | ||
'array-move', | ||
'react-dnd', | ||
'react-dnd-html5-backend', | ||
'@react-dnd', | ||
'dnd-core', | ||
'tween-one', | ||
'@babel', | ||
'@ant-design', | ||
]; | ||
|
||
const ignoreList = []; | ||
|
||
// cnpm use `_` as prefix | ||
['', '_'].forEach((prefix) => { | ||
compileModules.forEach((module) => { | ||
ignoreList.push(`${prefix}${module}`); | ||
}); | ||
}); | ||
|
||
module.exports = { | ||
setupFiles: ['./tests/setup.js'], | ||
snapshotSerializers: [require.resolve('enzyme-to-json/serializer')], | ||
setupFilesAfterEnv: ['<rootDir>/tests/setupFilesAfterEnv.js'], | ||
transformIgnorePatterns: [`/node_modules/(?!${ignoreList.join('|')})[^/]+?/(?!(es)/)`], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
54912b6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
tabs – ./
tabs-react-component.vercel.app
tabs-git-master-react-component.vercel.app