create-dev-agents 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/index.js +8 -3
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -70,7 +70,9 @@ export async function init(options = {}) {
|
|
|
70
70
|
|
|
71
71
|
// Create directories
|
|
72
72
|
spinner.start('Creating directories...');
|
|
73
|
-
|
|
73
|
+
// When installing globally, targetDir is already ~/.claude, so use 'commands' directly
|
|
74
|
+
const commandsDir = options.global ? 'commands' : '.claude/commands';
|
|
75
|
+
const dirs = [commandsDir];
|
|
74
76
|
if (selections.extras.includes('agents')) dirs.push('agents');
|
|
75
77
|
if (selections.extras.includes('templates')) dirs.push('templates');
|
|
76
78
|
if (selections.extras.includes('scripts')) dirs.push('scripts');
|
|
@@ -85,7 +87,7 @@ export async function init(options = {}) {
|
|
|
85
87
|
spinner.start('Installing commands...');
|
|
86
88
|
for (const cmd of selections.commands) {
|
|
87
89
|
const src = path.join(TEMPLATES_DIR, 'commands', `${cmd}.md`);
|
|
88
|
-
const dest = path.join(targetDir,
|
|
90
|
+
const dest = path.join(targetDir, commandsDir, `${cmd}.md`);
|
|
89
91
|
if (fs.existsSync(src)) {
|
|
90
92
|
fs.copyFileSync(src, dest);
|
|
91
93
|
}
|
|
@@ -123,7 +125,10 @@ export async function init(options = {}) {
|
|
|
123
125
|
if (selections.extras.includes('mcp')) {
|
|
124
126
|
spinner.start('Installing MCP config...');
|
|
125
127
|
const src = path.join(TEMPLATES_DIR, 'mcp-settings.json');
|
|
126
|
-
|
|
128
|
+
// When global, targetDir is ~/.claude, so settings.json goes directly there
|
|
129
|
+
const dest = options.global
|
|
130
|
+
? path.join(targetDir, 'settings.json')
|
|
131
|
+
: path.join(targetDir, '.claude', 'settings.json');
|
|
127
132
|
if (fs.existsSync(src) && !fs.existsSync(dest)) {
|
|
128
133
|
fs.copyFileSync(src, dest);
|
|
129
134
|
}
|