@jjdenhertog/ai-driven-development
Version:
AI-driven development workflow with learning capabilities for Claude
23 lines • 1.12 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.addPrompts = addPrompts;
const fs_extra_1 = require("fs-extra");
const node_path_1 = require("node:path");
const config_1 = require("../../config");
function addPrompts() {
// Create .claude directory if it doesn't exist
const templatesDir = (0, node_path_1.join)(config_1.STORAGE_PATH, 'prompts');
(0, fs_extra_1.ensureDirSync)(templatesDir);
// Copy command files one by one to .claude/commands
const templatesSourceDir = (0, node_path_1.join)(config_1.TEMPLATES_ROOT, 'prompts');
if ((0, fs_extra_1.existsSync)(templatesSourceDir)) {
const templateFiles = (0, fs_extra_1.readdirSync)(templatesSourceDir);
for (const file of templateFiles) {
const sourceFile = (0, node_path_1.join)(templatesSourceDir, file);
const targetFile = (0, node_path_1.join)(templatesDir, file);
if (!(0, fs_extra_1.existsSync)(targetFile))
(0, fs_extra_1.copySync)(sourceFile, targetFile, { overwrite: true });
}
}
}
//# sourceMappingURL=addPrompts.js.map