Refactor addMatchingFilesToGitignore function to handle file patterns and update gitignore accordingly
This commit is contained in:
9
main.js
9
main.js
@@ -666,6 +666,15 @@ function createRewriteScript(mapping) {
|
|||||||
return scriptPath;
|
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) {
|
async function autoCommit(folderPath, message, win) {
|
||||||
// ---- AUTOGENERATE .gitignore ----
|
// ---- AUTOGENERATE .gitignore ----
|
||||||
|
|||||||
Reference in New Issue
Block a user