-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
feat: quickly build cli with umi #11009
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
Size Change: +667 B (0%) Total Size: 9.85 MB
ℹ️ View Unchanged
|
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #11009 +/- ##
==========================================
- Coverage 29.21% 29.19% -0.03%
==========================================
Files 479 479
Lines 14384 14404 +20
Branches 3382 3388 +6
==========================================
+ Hits 4203 4205 +2
- Misses 9454 9472 +18
Partials 727 727
☔ View full report in Codecov by Sentry. |
这个地方感觉飞线不好,因为你改了 default config files ,其他的参数( 理想一点情况应该是: export const FRAMEWORK_NAME = process.env.FRAMEWORK_NAME || 'umi';
export const DEFAULT_CONFIG_FILES = [
'.${FRAMEWORK_NAME}rc.ts',
'.${FRAMEWORK_NAME}rc.js',
'config/config.ts',
'config/config.js',
]; if (opts?.presets) {
process.env[`${FRAMEWORK_NAME}_PRESETS`] = opts.presets.join(',');
} 这么做会更清真,涉及的变化有两个:
|
@fz6m 好复杂,我理一理再改。 |
@fz6m 不对,这些东西有些现在是不是通过 appData.umi.name 影响? |
我改了一版,我认为这样比较好,可以看下 但这种 归根结底这种 但我还是实现了一版,应该可以满足你的需求,但是在一定范围内可以运行的,有破绽。 |
基于 umi 构建一些特殊工具库时,无法指定配置文件。
如下使用
现在的做法是需要 copy 一下 packages/umi/src/service/service.ts 从自定义 services 指定配置文件,但又无法及时和 umi 仓库同步。