Browse Source
🔥 clean: remove unuse code (#6769)
* 🔥 clean: remove unuse code
* try use npm fix ci
pull/6779/head
陈帅
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with
14 additions and
13 deletions
-
.github/workflows/ci.yml
-
.github/workflows/deploy.yml
-
azure-pipelines.yml
-
src/layouts/BasicLayout.tsx
|
|
|
@ -16,7 +16,7 @@ jobs: |
|
|
|
with: |
|
|
|
node-version: ${{ matrix.node_version }} |
|
|
|
- run: echo ${{github.ref}} |
|
|
|
- run: yarn |
|
|
|
- run: npm install |
|
|
|
- run: yarn run lint |
|
|
|
- run: yarn run tsc |
|
|
|
- run: yarn run build |
|
|
|
|
|
|
|
@ -9,8 +9,8 @@ jobs: |
|
|
|
steps: |
|
|
|
- name: Checkout |
|
|
|
uses: actions/checkout@master |
|
|
|
- run: yarn |
|
|
|
- run: yarn run lint |
|
|
|
- run: npm install |
|
|
|
- run: npm run lint |
|
|
|
# - run: yarn run tsc |
|
|
|
- name: Build and Deploy |
|
|
|
uses: JamesIves/github-pages-deploy-action@master |
|
|
|
@ -25,4 +25,4 @@ jobs: |
|
|
|
GITHUB_TOKEN: ${{ secrets.ACTION_TOKEN }} |
|
|
|
BRANCH: gh-pages |
|
|
|
FOLDER: 'dist/' |
|
|
|
BUILD_SCRIPT: yarn && npm uninstall husky && yarn add umi-plugin-antd-theme umi-plugin-pro && npm run site && git checkout . && git clean -df |
|
|
|
BUILD_SCRIPT: npm install && npm uninstall husky && yarn add umi-plugin-antd-theme umi-plugin-pro && npm run site && git checkout . && git clean -df |
|
|
|
|
|
|
|
@ -16,7 +16,7 @@ jobs: |
|
|
|
steps: |
|
|
|
- checkout: self |
|
|
|
clean: false |
|
|
|
- script: yarn |
|
|
|
- script: npm install |
|
|
|
displayName: install |
|
|
|
- script: npm run lint |
|
|
|
displayName: lint |
|
|
|
@ -36,7 +36,7 @@ jobs: |
|
|
|
options: '-u root' |
|
|
|
|
|
|
|
steps: |
|
|
|
- script: yarn |
|
|
|
- script: npm install |
|
|
|
displayName: install |
|
|
|
- script: npm run test:all |
|
|
|
env: |
|
|
|
@ -51,7 +51,7 @@ jobs: |
|
|
|
- task: NodeTool@0 |
|
|
|
inputs: |
|
|
|
versionSpec: '12.x' |
|
|
|
- script: yarn |
|
|
|
- script: npm install |
|
|
|
displayName: install |
|
|
|
- script: npm run lint |
|
|
|
displayName: lint |
|
|
|
@ -74,7 +74,7 @@ jobs: |
|
|
|
- task: NodeTool@0 |
|
|
|
inputs: |
|
|
|
versionSpec: '12.x' |
|
|
|
- script: yarn |
|
|
|
- script: npm install |
|
|
|
displayName: install |
|
|
|
- script: npm run lint |
|
|
|
displayName: lint |
|
|
|
|
|
|
|
@ -52,13 +52,16 @@ export type BasicLayoutContext = { [K in 'location']: BasicLayoutProps[K] } & { |
|
|
|
|
|
|
|
const menuDataRender = (menuList: MenuDataItem[]): MenuDataItem[] => |
|
|
|
menuList.map((item) => { |
|
|
|
const localItem = { ...item, children: item.children ? menuDataRender(item.children) : [] }; |
|
|
|
const localItem = { |
|
|
|
...item, |
|
|
|
children: item.children ? menuDataRender(item.children) : undefined, |
|
|
|
}; |
|
|
|
return Authorized.check(item.authority, localItem, null) as MenuDataItem; |
|
|
|
}); |
|
|
|
|
|
|
|
const defaultFooterDom = ( |
|
|
|
<DefaultFooter |
|
|
|
copyright={`${(new Date()).getFullYear()} 蚂蚁金服体验技术部出品`} |
|
|
|
copyright={`${new Date().getFullYear()} 蚂蚁金服体验技术部出品`} |
|
|
|
links={[ |
|
|
|
{ |
|
|
|
key: 'Ant Design Pro', |
|
|
|
@ -132,11 +135,9 @@ const BasicLayout: React.FC<BasicLayoutProps> = (props) => { |
|
|
|
)} |
|
|
|
onCollapse={handleMenuCollapse} |
|
|
|
menuItemRender={(menuItemProps, defaultDom) => { |
|
|
|
if (menuItemProps.isUrl || !menuItemProps.path |
|
|
|
|| menuItemProps.children?.length) { |
|
|
|
if (menuItemProps.isUrl || !menuItemProps.path) { |
|
|
|
return defaultDom; |
|
|
|
} |
|
|
|
|
|
|
|
return <Link to={menuItemProps.path}>{defaultDom}</Link>; |
|
|
|
}} |
|
|
|
breadcrumbRender={(routers = []) => [ |
|
|
|
|