Skip to content

build: migrate to dumi & father-build #488

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,4 @@ tsconfig.test.json
.prettierignore
.storybook
storybook/index.js
.umi
7 changes: 7 additions & 0 deletions .umirc.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { defineConfig } from 'dumi';

export default defineConfig({
logo: 'https://gw.alipayobjects.com/zos/rmsportal/KDpgvguMpGfqaHPjicRK.svg',
outputPath: '.doc',
exportStatic: {},
});
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,11 @@ export default () => (
| filterOption | whether filter options by input value. default filter by option's optionFilterProp prop's value | bool | true/Function(inputValue:string, option:Option) |
| optionFilterProp | which prop value of option will be used for filter if filterOption is true | String | 'value' |
| optionLabelProp | render option value or option children as content of select | String: 'value'/'children' | 'value' |
| defaultValue | initial selected option(s) | String/Array<String> | - |
| value | current selected option(s) | String/Array<String>/{key:String, label:React.Node}/Array<{key, label}> | - |
| defaultValue | initial selected option(s) | String/Array&lt;String&gt; | - |
| value | current selected option(s) | String/Array&lt;String&gt;/{key:String, label:React.Node}/Array&lt;{key, label}&gt; | - |
| labelInValue | whether to embed label in value, see above value type. Not support `combobox` mode | Bool | false |
| backfill | whether backfill select option to search input (Only works in single and combobox mode) | Bool | false |
| onChange | called when select an option or input value change(combobox) | function(value, option:Option/Array<Option>) | - |
| onChange | called when select an option or input value change(combobox) | function(value, option:Option/Array&lt;Option&gt;) | - |
| onSearch | called when input changed | function | - |
| onBlur | called when blur | function | - |
| onFocus | called when focus | function | - |
Expand Down
14 changes: 8 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@
},
"license": "MIT",
"scripts": {
"start": "cross-env NODE_ENV=development father doc dev --storybook",
"build": "father doc build --storybook",
"compile": "father build",
"start": "dumi dev",
"build": "dumi build",
"compile": "father-build",
"prepublishOnly": "npm run compile && np --no-cleanup --yolo --no-publish",
"lint": "eslint src/ examples/ --ext .tsx,.ts,.jsx,.js",
"test": "father test",
"test": "umi-test",
Copy link
Member

Choose a reason for hiding this comment

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

father umi dumi 这里面三套东西。

Copy link
Author

Choose a reason for hiding this comment

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

目前是这样的,后面 dumi、@umijs/test 都可以作为 umi preset 挂载到 father 上,对用户来说会 all in father 了,比如 father test -- 等同于 --> @umijs/test,father dev -- 等同于 --> dumi

"now-build": "npm run build"
},
"peerDependencies": {
Expand All @@ -57,13 +57,15 @@
"@types/react-dom": "^16.8.4",
"@types/warning": "^3.0.0",
"cross-env": "^7.0.0",
"dumi": "^1.0.24",
"enzyme": "^3.3.0",
"enzyme-to-json": "^3.4.0",
"eslint": "^6.8.0",
"father": "^2.13.2",
"father-build": "^1.18.0",
"jsonp": "^0.2.1",
"np": "^6.0.0",
"rc-dialog": "^7.5.5",
"typescript": "^3.5.2"
"typescript": "^3.5.2",
"umi-test": "^1.9.6"
}
}