UNPKG

@codemafia0000/d0

Version:

Claude Multi-Agent Automated Development AI - Revolutionary development environment where multiple AI agents collaborate to automate software development

37 lines (29 loc) 888 B
const fs = require('fs'); const path = require('path'); const CONSTANTS = require('../constants'); function updateGitignore(projectDir) { const gitignorePath = path.join(projectDir, '.gitignore'); // Define what should be ignored in .d0 directory const d0IgnoreEntries = CONSTANTS.D0_GITIGNORE_ENTRIES; let gitignoreContent = ''; let needsUpdate = false; if (fs.existsSync(gitignorePath)) { gitignoreContent = fs.readFileSync(gitignorePath, 'utf8'); // Check if d0 entries already exist if (!gitignoreContent.includes('.d0/tmp/')) { needsUpdate = true; } } else { needsUpdate = true; } if (needsUpdate) { // Append d0 ignore entries gitignoreContent += d0IgnoreEntries.join('\n'); fs.writeFileSync(gitignorePath, gitignoreContent); return true; } return false; } module.exports = { updateGitignore };