question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

在 Ant Design Pro V4 版本中,我们将要通过区块来组织页面,并且需要能够让开发可以通过 cli 工具来初始化 pro 的项目,能够灵活的选择初始化的页面,以及是否使用 TypeScript 等。不再像以前那样通过直接 clone ant-design-pro 的代码来使用,这就意味着 V4 版本的代码组织方式也将有所不同。需要讨论下后面怎么组织 V4 的代码。

当前有两个初步的方案:

方案 1:

方案 2:

  • ant-design/ant-design-pro 中包含 layout + 区块的全部代码
  • 通过脚本把 layout 和 区块拆开同步到 umi 现在的仓库中

另外还有其他需要考虑的问题:

  • components 下面 ant-design-pro 这个包的代码放哪里,是否和 layout 放在一起,如果放在一起那么怎么在初始化项目的时候把它抽离出去
  • 如果要同时支持 TypeScript 和 ES6 的版本,基于 TS 的代码编译成为 ES6 的,那么 ES6 的代码放哪里?
  • 如果区块放到 ant-design 中直接维护,那么 umi-blocks/ant-design-pro 的区块将要删除,umi block list 这个命令就再也看不到 pro 的区块,这个要怎么解决?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:18 (13 by maintainers)

github_iconTop GitHub Comments

2reactions
yutingzhao1991commented, Jan 15, 2019

@a854363956 同时支持的意思不是说一部分是 ts 一部分是 es,就是指支持两种方式的完整的代码。

2reactions
afc163commented, Jan 11, 2019

umi block fetch

Read more comments on GitHub >

github_iconTop Results From Across the Web

[v4,4/4] init: provide useful advice about init.defaultBranch
This default branch name\n" > +"is subject to change. To configure the initial branch name to use in all\n" > +"of your new...
Read more >
Web Advanced Features - Branch Help
Loads Branch into your appUses Branch init options Returns the following inside the data object Creates a deep link URL with encapsulated dataUses...
Read more >
How can I create a Git repository with the default branch name ...
These two commands create a new Git repo with a branch named "trunk", which always made more sense to ... git init --initial-branch=trunk...
Read more >
Change Git's Init Branch Name Default - YouTube
Do you want the Git init command to create a branch named master or main? Or maybe you want the default git init...
Read more >
4 ways to create a Git branch quickly by example
How to delete a Git branch locally – TheServerSide.com ; Working with Git branches and repositories – Software Quality ; Full Gitflow init...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found