-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
支持自定义页面和组件微生成器的模板 #9974
支持自定义页面和组件微生成器的模板 #9974
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #9974 +/- ##
=========================================
Coverage ? 30.49%
=========================================
Files ? 433
Lines ? 12482
Branches ? 2984
=========================================
Hits ? 3807
Misses ? 8103
Partials ? 572
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
其他: 用户并不知道模板会获得哪些参数,我感觉可以新增一个 |
感谢指教,三个建议都很受用,我再更改一版。 |
2cb334d
to
ab3ab8f
Compare
f694eeb
to
5647994
Compare
5647994
to
5ca94bd
Compare
2a16087
to
486f579
Compare
不知道这样修改后是不是比之前好一些,现在把逻辑都放到 其中的 umi/packages/utils/src/Generator/Generator.ts Lines 61 to 67 in 7df3189
有一个点没有想到好的解决方案: 在自定义模板生成成功或者 eject 模板成功后,会 log 日志,如果在测试的时候允许这个行为,控制台 log 会比较多,可能会影响其他同学测试。经过一些尝试后,最后选的是粗暴的 mock console.log,感觉有点笨,不知道有没有其他更好的方案。log 没有选择 |
docs: update micro-generator docs test: condition mock log in test
docs: update doc
486f579
to
e1d9be5
Compare
3bae51a
to
fcc80b9
Compare
fcc80b9
to
8b886c3
Compare
support: 微生成器支持使用自定义的模板
新增功能:
个人考虑除这两个以外的其他模板,好像对自定义模板不是特别的需要,于是就没有添加。可能是我没有想到,如果有更好的建议,我可以继续修改。