vue3-admin-gpt 1.0.0 → 1.1.0

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.
package/README.md CHANGED
@@ -17,15 +17,8 @@
17
17
  ### 使用 CLI 工具创建项目
18
18
 
19
19
  ```bash
20
- # 使用 npm
21
- npm create vue3-admin-gpt my-project
22
-
23
- # 或使用 npx
24
- npx create-vue3-admin-gpt my-project
25
-
26
- # 或全局安装 CLI
27
- npm install -g vue3-admin-gpt
28
- create-vue3-admin-gpt my-project
20
+ # 使用 npx(推荐)
21
+ npx vue3-admin-gpt my-project
29
22
  ```
30
23
 
31
24
  ### 手动安装
package/cli.js CHANGED
@@ -34,8 +34,10 @@ function copyDir(src, dest, exclude = []) {
34
34
  const srcPath = path.join(src, entry.name);
35
35
  const destPath = path.join(dest, entry.name);
36
36
 
37
- // 跳过排除的文件/目录
38
- if (exclude.some(pattern => srcPath.includes(pattern))) {
37
+ // 跳过排除的文件/目录(只匹配文件名/目录名,不匹配路径)
38
+ const excludedPattern = exclude.find(pattern => entry.name === pattern || entry.name.startsWith(pattern));
39
+ // 也排除 .tgz 文件
40
+ if (excludedPattern || entry.name.endsWith('.tgz')) {
39
41
  continue;
40
42
  }
41
43
 
@@ -73,6 +75,11 @@ async function createProject() {
73
75
  'package-lock.json',
74
76
  'yarn.lock',
75
77
  '.claude',
78
+ projectName, // 排除目标项目目录本身(防止在项目目录内运行时无限循环)
79
+ // 排除项目开发时的临时文件和目录
80
+ 'build-zip.js',
81
+ 'build-zip.ps1',
82
+ 'components.d.ts',
76
83
  // 排除常见的前端临时目录
77
84
  'my-test-project',
78
85
  'my-admin-app',