mirror of
https://github.com/bmadcode/BMAD-METHOD.git
synced 2025-12-29 16:14:59 +00:00
installer for bmm includes option to include game assets or not when adding to a project.
This commit is contained in:
@@ -113,7 +113,7 @@ class ModuleManager {
|
||||
}
|
||||
|
||||
// Copy module files with filtering
|
||||
await this.copyModuleWithFiltering(sourcePath, targetPath, fileTrackingCallback);
|
||||
await this.copyModuleWithFiltering(sourcePath, targetPath, fileTrackingCallback, options.moduleConfig);
|
||||
|
||||
// Process agent files to inject activation block
|
||||
await this.processAgentFiles(targetPath, moduleName);
|
||||
@@ -231,14 +231,26 @@ class ModuleManager {
|
||||
}
|
||||
|
||||
/**
|
||||
* Copy module with filtering for localskip agents
|
||||
* Copy module with filtering for localskip agents and conditional content
|
||||
* @param {string} sourcePath - Source module path
|
||||
* @param {string} targetPath - Target module path
|
||||
* @param {Function} fileTrackingCallback - Optional callback to track installed files
|
||||
* @param {Object} moduleConfig - Module configuration with conditional flags
|
||||
*/
|
||||
async copyModuleWithFiltering(sourcePath, targetPath, fileTrackingCallback = null) {
|
||||
async copyModuleWithFiltering(sourcePath, targetPath, fileTrackingCallback = null, moduleConfig = {}) {
|
||||
// Get all files in source
|
||||
const sourceFiles = await this.getFileList(sourcePath);
|
||||
|
||||
// Game development files to conditionally exclude
|
||||
const gameDevFiles = [
|
||||
'agents/game-architect.agent.yaml',
|
||||
'agents/game-designer.agent.yaml',
|
||||
'agents/game-dev.agent.yaml',
|
||||
'workflows/1-analysis/brainstorm-game',
|
||||
'workflows/1-analysis/game-brief',
|
||||
'workflows/2-plan-workflows/gdd',
|
||||
];
|
||||
|
||||
for (const file of sourceFiles) {
|
||||
// Skip sub-modules directory - these are IDE-specific and handled separately
|
||||
if (file.startsWith('sub-modules/')) {
|
||||
@@ -255,6 +267,19 @@ class ModuleManager {
|
||||
continue;
|
||||
}
|
||||
|
||||
// Skip game development content if include_game_planning is false
|
||||
if (moduleConfig.include_game_planning === false) {
|
||||
const shouldSkipGameDev = gameDevFiles.some((gamePath) => {
|
||||
// Check if file path starts with or is within any game dev directory
|
||||
return file === gamePath || file.startsWith(gamePath + '/') || file.startsWith(gamePath + '\\');
|
||||
});
|
||||
|
||||
if (shouldSkipGameDev) {
|
||||
console.log(chalk.dim(` Skipping game dev content: ${file}`));
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
const sourceFile = path.join(sourcePath, file);
|
||||
const targetFile = path.join(targetPath, file);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user