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

[Bug] create-umi 第三方 template 缺陷 #11559

Open
xiefengnian opened this issue Aug 24, 2023 · 1 comment
Open

[Bug] create-umi 第三方 template 缺陷 #11559

xiefengnian opened this issue Aug 24, 2023 · 1 comment

Comments

@xiefengnian
Copy link
Contributor

What happens?

使用 npm create umi --template electron 时,在源中获取 tar 包时,是无法正确获取所需的 .npmrc 和 .gitignore 的。

Mini Showcase Repository(REQUIRED)

Please provide a minimal reproduction then upload to your GitHub. 请提供 最小重现,并上传到你的 GitHub 仓库

https://github.com/umijs/umi/blob/master/packages/create-umi/src/template.ts#L17

How To Reproduce

npm create umi --template electron

Context

  • Umi Version: latest
  • Node Version: any
  • Platform: any
@fz6m
Copy link
Member

fz6m commented Aug 24, 2023

后续建议:在 unpack 完下载好的代码后,遍历产物文件目录,过一遍模板引擎,此时可以注入需要的 umi 内部变量信息,对于 .npmrc 同 umi 现在内置模板一样,使用 .npmrc.tpl 即可,模板引擎会渲染这些 .tpl 的文件。

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

No branches or pull requests

2 participants