create-tengits-app 1.1.3 → 1.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/bin/cli.js +5 -4
  2. package/package.json +1 -1
package/bin/cli.js CHANGED
@@ -199,7 +199,8 @@ const createProject = async () => {
199
199
 
200
200
  // 需要保留的文件(即使在其他排除列表中)
201
201
  const keepFiles = [
202
- 'bin/setup-ttos.js'
202
+ 'bin/setup-ttos.js',
203
+ '.gitignore'
203
204
  ];
204
205
 
205
206
  // 复制模板文件
@@ -237,10 +238,10 @@ const createProject = async () => {
237
238
  templateFiles.forEach(file => {
238
239
  if (file !== 'packages') {
239
240
  const relativePath = path.relative(templateDir, path.join(templateDir, file));
240
- const shouldKeep = keepFiles.some(keepFile => relativePath.startsWith(keepFile.split('/')[0]));
241
+ const shouldKeep = keepFiles.some(keepFile => relativePath === keepFile);
241
242
 
242
- // 对于bin目录,总是复制(因为setup-ttos.js需要被保留)
243
- if (file === 'bin' || !excludeList.includes(file) || shouldKeep) {
243
+ // 对于bin目录和.gitignore文件,总是复制
244
+ if (file === 'bin' || file === '.gitignore' || !excludeList.includes(file) || shouldKeep) {
244
245
  const srcPath = path.join(templateDir, file);
245
246
  const destPath = path.join(targetDir, file);
246
247
  copyRecursive(srcPath, destPath);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-tengits-app",
3
- "version": "1.1.3",
3
+ "version": "1.1.4",
4
4
  "description": "🚀 快速创建基于 React + Rsbuild + TypeScript + Tailwind CSS + Antd 的现代前端项目脚手架",
5
5
  "author": "",
6
6
  "license": "MIT",