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

feat(plugins): layout plugin support conventional layout #951

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

xierenyuan
Copy link
Member

@xierenyuan xierenyuan commented Jun 21, 2022

改动点

  • layout 插件 过滤掉 addLayout 增加的布局
  • 默认的约定式布局支持 layout: false
  • preset-umi getRoutes 增加单元测试

@vercel
Copy link

vercel bot commented Jun 21, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Updated
umi-next ⬜️ Ignored (Inspect) Jun 22, 2022 at 5:14PM (UTC)

@xierenyuan
Copy link
Member Author

filterFn 是否需要暴露给用户, 可以解决用户自己使用 addLayouts 的场景

@codecov
Copy link

codecov bot commented Jun 21, 2022

Codecov Report

Merging #951 (d8adb65) into master (42be016) will increase coverage by 0.59%.
The diff coverage is 100.00%.

❗ Current head d8adb65 differs from pull request most recent head 27ee275. Consider uploading reports for the commit 27ee275 to get more accurate results

@@            Coverage Diff             @@
##           master     #951      +/-   ##
==========================================
+ Coverage   34.11%   34.70%   +0.59%     
==========================================
  Files         350      350              
  Lines        8797     8799       +2     
  Branches     2051     2051              
==========================================
+ Hits         3001     3054      +53     
+ Misses       5459     5414      -45     
+ Partials      337      331       -6     
Impacted Files Coverage Δ
packages/plugins/src/layout.ts 0.00% <ø> (ø)
...ackages/preset-umi/src/features/tmpFiles/routes.ts 52.57% <100.00%> (+52.57%) ⬆️
packages/plugins/src/dva.ts 39.06% <0.00%> (ø)
...eset-umi/src/features/tmpFiles/getModuleExports.ts 33.33% <0.00%> (+33.33%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 42be016...27ee275. Read the comment docs.

packages/plugins/src/layout.ts Outdated Show resolved Hide resolved
}
}

return newRoutes
Copy link
Member

Choose a reason for hiding this comment

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

code style

Copy link
Member

Choose a reason for hiding this comment

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

;

packages/plugins/src/layout.ts Show resolved Hide resolved
@xierenyuan xierenyuan changed the title feat(plugins): layout plugin support conventional layout WIP:feat(plugins): layout plugin support conventional layout Jun 22, 2022
@xierenyuan xierenyuan changed the title WIP:feat(plugins): layout plugin support conventional layout feat(plugins): layout plugin support conventional layout Jun 22, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants