feat: enhance file exclusion capabilities with .bmad-flattenignore support (#531)
- Added support for a new optional `.bmad-flattenignore` file to allow users to specify additional files to exclude from the flattened XML output. - Updated README and documentation to reflect the new feature and provide examples for usage. - Modified ignore rules to incorporate patterns from the `.bmad-flattenignore` file after applying `.gitignore` rules. Benefits: - Greater flexibility in managing file exclusions for AI model consumption.
This commit is contained in:
@@ -154,9 +154,11 @@ async function parseGitignore(gitignorePath) {
|
||||
async function loadIgnore(rootDir, extraPatterns = []) {
|
||||
const ig = ignore();
|
||||
const gitignorePath = path.join(rootDir, '.gitignore');
|
||||
const flattenIgnorePath = path.join(rootDir, '.bmad-flattenignore');
|
||||
const patterns = [
|
||||
...(await readIgnoreFile(gitignorePath)),
|
||||
...DEFAULT_PATTERNS,
|
||||
...(await readIgnoreFile(flattenIgnorePath)),
|
||||
...extraPatterns,
|
||||
];
|
||||
// De-duplicate
|
||||
|
||||
Reference in New Issue
Block a user