Skip to content
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

perf: cnpm and tnpm are supported #10452

Merged
merged 12 commits into from
Feb 10, 2023
Merged

perf: cnpm and tnpm are supported #10452

merged 12 commits into from
Feb 10, 2023

Conversation

txp1035
Copy link
Member

@txp1035 txp1035 commented Feb 8, 2023

Close #10442

进展:图标库已发版,支持自定义安装
我想的是把现有的安装包的工具扩展下,可以支持单独安装同时不影响之前的。

@vercel
Copy link

vercel bot commented Feb 8, 2023

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

1 Ignored Deployment
Name Status Preview Comments Updated
umi ⬜️ Ignored (Inspect) Feb 9, 2023 at 8:55AM (UTC)

@codecov
Copy link

codecov bot commented Feb 8, 2023

Codecov Report

Base: 29.67% // Head: 29.59% // Decreases project coverage by -0.09% ⚠️

Coverage data is based on head (145c22a) compared to base (c2dde51).
Patch coverage: 0.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #10452      +/-   ##
==========================================
- Coverage   29.67%   29.59%   -0.09%     
==========================================
  Files         445      446       +1     
  Lines       13013    13050      +37     
  Branches     3069     3080      +11     
==========================================
  Hits         3862     3862              
- Misses       8511     8545      +34     
- Partials      640      643       +3     
Impacted Files Coverage Δ
...eset-umi/src/features/depsOnDemand/depsOnDemand.ts 0.00% <0.00%> (ø)
packages/preset-umi/src/features/icons/icons.ts 0.00% <ø> (ø)
packages/preset-umi/src/features/icons/svgr.ts 0.00% <0.00%> (ø)
packages/preset-umi/src/features/check/check.ts 0.00% <0.00%> (ø)
packages/plugins/src/confetti.ts 0.00% <0.00%> (ø)

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.
📢 Do you have feedback about the report comment? Let us know in this issue.

@txp1035 txp1035 changed the title [wip]perf: cnpm and tnpm are supported perf: cnpm and tnpm are supported Feb 9, 2023
@txp1035 txp1035 requested a review from sorrycc February 9, 2023 02:05
Comment on lines 43 to 46
await installWithNpmClient({
npmClient: opts.npmClient as NpmClient,
options: { dev: true, names: [name] },
});
Copy link
Member

Choose a reason for hiding this comment

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

这里的实现思路需要调整下。先修改 package.json 增加依赖信息,然后在执行 installWithNpmClient,所以 installWithNpmClient 和之前保持一致,不需要改。

packages/preset-umi/src/features/icons/icons.ts Outdated Show resolved Hide resolved
@txp1035 txp1035 requested a review from sorrycc February 9, 2023 08:48
svg = await loadNodeIcon(opts.collect, opts.icon, {
warn,
addXmlNs: false,
autoInstall: false,
...opts.iconifyOptions,
autoInstall: autoInstall
Copy link
Member

Choose a reason for hiding this comment

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

把 autoInstall 的自定义方法内容提到外层(icons.ts)里吧,把 api 插进去之后 generateSvgr 就不那么纯粹了。

@sorrycc sorrycc merged commit 603263b into umijs:master Feb 10, 2023
@sorrycc
Copy link
Member

sorrycc commented Feb 10, 2023

这个功能我希望尽快收尾了,所以先合了,合完之后我再调整下。

@txp1035 txp1035 deleted the icons_install branch February 10, 2023 02:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

给「@antfu/install-pkg」提 PR,支持 tnpm/cnpm
2 participants