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

[cli] 生成的lite版模板没有".gitignore"文件 #42

Closed
fengyon opened this issue May 19, 2023 · 7 comments
Closed

[cli] 生成的lite版模板没有".gitignore"文件 #42

fengyon opened this issue May 19, 2023 · 7 comments
Assignees
Labels

Comments

@fengyon
Copy link
Contributor

fengyon commented May 19, 2023

tdesign-starter-cli 版本

0.3.3

重现链接

无需链接即可重现

重现步骤

执行命令

td-starter init

按步骤生成lite模板

? 请输入项目名称: test2
? 请输入项目描述: Base on tdesign-starter-cli
? 选择模板类型: (Use arrow keys)
❯ 【Vue2】模板 
? 生成代码版本: (Use arrow keys)
❯  Lite版本 (只包含TDesign的基本使用和项目工程)
? 请选择构建工具 (Use arrow keys)
❯  vite

生成模板成功

👉  开始构建,请稍侯...

⠋ 正在构建模板...👉  生成代码完毕...

✔ 构建成功!

👏 初始化项目完成!👏

打开模板地址,没有.gitignore文件

cd test2 && ls -a 
# .		README.md	index.html	public		vite.config.js
# ..		assets		package.json	src

期望结果

生成的lite模板含有.gitignore文件

实际结果

模板没有.gitignore文件。.gitignore文件非常重要,没有此文件可能导致不注意时上传了node_modules或者其他文件。

框架版本

No response

浏览器版本

No response

系统版本

No response

Node版本

16.20.0

补充说明

根据npm官网文档.gitignore文件会被忽略发布,需要特殊配置

原文信息:
Files included in package
To see what will be included in your package, run npm pack --dry-run. All files are included by default, with the following exceptions:

Certain files that are relevant to package installation and distribution are always included. For example, package.json, README.md, LICENSE, and so on.

If there is a "files" list in package.json, then only the files specified will be included. (If directories are specified, then they will be walked recursively and their contents included, subject to the same ignore rules.)

If there is a .gitignore or .npmignore file, then ignored files in that and all child directories will be excluded from the package. If both files exist, then the .gitignore is ignored, and only the .npmignore is used.

.npmignore files follow the same pattern rules as .gitignore files

If the file matches certain patterns, then it will never be included, unless explicitly added to the "files" list in package.json, or un-ignored with a ! rule in a .npmignore or .gitignore file.

Symbolic links are never included in npm packages.

See developers for full details on what's included in the published package, as well as details on how the package is built.

@github-actions
Copy link
Contributor

👋 @fengyon,感谢给 TDesign 提出了 issue。
请根据 issue 模版确保背景信息的完善,我们将调查并尽快回复你。

@github-actions
Copy link
Contributor

github-actions bot commented May 19, 2023

♥️ 有劳 @uyarn 尽快确认问题。
确认有效后将下一步计划和可能需要的时间回复给 @fengyon

@fengyon
Copy link
Contributor Author

fengyon commented May 19, 2023

我已经找到此问题的原因,我将尝试修复此问题

@github-actions
Copy link
Contributor

这个 Issue 被标记为了过时 stale ,因为它已经持续 30 天没有任何活动了。删除 stale 标签或评论,否则将在 7 天内关闭。

@github-actions github-actions bot added the Stale label Jun 23, 2023
@fengyon
Copy link
Contributor Author

fengyon commented Jun 25, 2023

请问这个issue进展怎么样,是问题吗?给出的修复方案能合入吗

@github-actions github-actions bot removed the Stale label Jun 26, 2023
@uyarn
Copy link
Collaborator

uyarn commented Jun 29, 2023

请问这个issue进展怎么样,是问题吗?给出的修复方案能合入吗

我看下哈

@github-actions
Copy link
Contributor

这个 Issue 被标记为了过时 stale ,因为它已经持续 30 天没有任何活动了。删除 stale 标签或评论,否则将在 7 天内关闭。

@github-actions github-actions bot added the Stale label Jul 29, 2023
@uyarn uyarn closed this as completed Jul 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants