1
0

Refactor addMatchingFilesToGitignore function to handle file patterns and update gitignore accordingly

This commit is contained in:
2025-06-01 06:46:19 +02:00
parent c8f1e53a7a
commit 357861d3b6

View File

@@ -666,6 +666,15 @@ function createRewriteScript(mapping) {
return scriptPath;
}
function addMatchingFilesToGitignore(folderPath, pattern) {
const files = fs.readdirSync(folderPath);
const matches = micromatch(files, pattern);
for (const file of matches) {
ensureInGitignore(folderPath, pattern);
break; // Nur einmal pro Pattern eintragen
}
}
async function autoCommit(folderPath, message, win) {
// ---- AUTOGENERATE .gitignore ----