create-golden 1.4.7 → 1.4.8
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/index.js +10 -2
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -53,7 +53,15 @@ async function downloadFile(url, dest, token) {
|
|
|
53
53
|
|
|
54
54
|
function shouldExclude(filePath) {
|
|
55
55
|
const parts = filePath.split(path.sep);
|
|
56
|
-
|
|
56
|
+
// 排除标准排除目录
|
|
57
|
+
if (EXCLUDE_DIRS.some(dir => parts.includes(dir))) {
|
|
58
|
+
return true;
|
|
59
|
+
}
|
|
60
|
+
// 排除 VI spec 目录(注意路径中可能有空格)
|
|
61
|
+
if (filePath.includes('VI spec') || filePath.includes('VI spec/') || filePath.includes('VI spec\\')) {
|
|
62
|
+
return true;
|
|
63
|
+
}
|
|
64
|
+
return false;
|
|
57
65
|
}
|
|
58
66
|
|
|
59
67
|
async function extractZip(zipPath, extractTo) {
|
|
@@ -141,7 +149,7 @@ function saveToken(token) {
|
|
|
141
149
|
|
|
142
150
|
function updateGitignore(projectRoot) {
|
|
143
151
|
const gitignorePath = path.join(projectRoot, '.gitignore');
|
|
144
|
-
const ignoreRules = ['.cursorrules', '代码规范.md', 'AGENTS.md', '组件和功能速查地图.md', 'src/pages/demo'];
|
|
152
|
+
const ignoreRules = ['.cursorrules', '代码规范.md', 'AGENTS.md', '组件和功能速查地图.md', 'src/pages/demo' ];
|
|
145
153
|
|
|
146
154
|
try {
|
|
147
155
|
let gitignoreContent = '';
|