Skip to content
This repository has been archived by the owner on Aug 11, 2020. It is now read-only.

Commit

Permalink
πŸ“¦ package: remove father (#538)
Browse files Browse the repository at this point in the history
* πŸ“¦ package: remove father

* fix ts lint

* fix tsc error
  • Loading branch information
chenshuai2144 authored Jul 6, 2020
1 parent e31e4ae commit fc09ab1
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 66 deletions.
57 changes: 0 additions & 57 deletions example/src/e2e/baseLayout.e2e.js

This file was deleted.

7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"/dist"
],
"scripts": {
"build": "father build && webpack",
"build": "father-build && webpack",
"start": "dumi dev",
"lint": "npm run lint-eslint && npm run lint:style",
"lint-eslint": "eslint --cache --ext .js,.jsx,.ts,.tsx --format=pretty ./src",
Expand All @@ -45,7 +45,7 @@
"site": "dumi build && gh-pages -d ./dist",
"site_build": "dumi build",
"doc": "cd ./example && umi dev",
"test": "father test",
"test": "umi-test",
"tsc": "tsc"
},
"husky": {
Expand Down Expand Up @@ -122,7 +122,7 @@
"enzyme": "^3.11.0",
"enzyme-to-json": "^3.4.3",
"eslint": "^7.2.0",
"father": "^2.26.0",
"father-build": "^1.18.1",
"gh-pages": "^3.1.0",
"husky": "^4.0.0",
"jsdom": "^16.2.0",
Expand All @@ -143,6 +143,7 @@
"typescript": "^3.8.3",
"umi": "^3.0.0",
"umi-plugin-githubpages": "^2.0.0",
"umi-test": "^1.9.6",
"umi-types": "^0.5.11",
"webpack-cli": "^3.3.10"
},
Expand Down
6 changes: 3 additions & 3 deletions src/SiderMenu/BaseMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ class MenuUtil {
* @param BaseMenuProps
*/
const getOpenKeysProps = (
openKeys: string[] | false = [],
openKeys: React.ReactText[] | false = [],
{ layout, collapsed }: BaseMenuProps,
): {
openKeys?: undefined | string[];
Expand Down Expand Up @@ -276,7 +276,7 @@ const BaseMenu: React.FC<BaseMenuProps> = (props) => {
const [defaultOpenAll, setDefaultOpenAll] = useState(menu.defaultOpenAll);

const [openKeys, setOpenKeys] = useMergeValue<
WithFalse<string[] | undefined>
WithFalse<React.ReactText[] | undefined>
>(
() => {
if (menu.defaultOpenAll) {
Expand Down Expand Up @@ -398,7 +398,7 @@ const BaseMenu: React.FC<BaseMenuProps> = (props) => {
selectedKeys={selectedKeys}
style={style}
className={cls}
onOpenChange={setOpenKeys}
onOpenChange={(keys) => setOpenKeys(keys as string[])}
{...props.menuProps}
>
{menuUtils.getNavMenuItems(
Expand Down
2 changes: 1 addition & 1 deletion tests/__tests__/compatible.test.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { mount, render } from 'enzyme';
import { mount } from 'enzyme';

import React from 'react';
import BasicLayout from '../../src/BasicLayout';
Expand Down
6 changes: 4 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"@ant-design/pro-layout": ["./src"]
}
},
"include": ["**/tests/", "**/src/", "**/docs/"],
"include": ["**/src/", "**/docs/"],
"exclude": [
"node_modules",
"build",
Expand All @@ -31,6 +31,8 @@
"jest",
"tslint:latest",
"tslint-config-prettier",
"example"
"example",
"**/tests/",
"**/docs/"
]
}

0 comments on commit fc09ab1

Please sign in to comment.