Skip to content

Commit

Permalink
Merge pull request #14 from omnisat/cursor
Browse files Browse the repository at this point in the history
cursor file fixed
  • Loading branch information
0xBunzy authored Nov 18, 2024
2 parents 451568d + 8a58c22 commit 1a80e86
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/bin/script.ts
Original file line number Diff line number Diff line change
Expand Up @@ -267,13 +267,21 @@ async function init() {
const targetCursorRulesPath = path.join(root, ".cursorrules");

if (fs.existsSync(cursorRulesPath)) {
fs.copyFileSync(cursorRulesPath, targetCursorRulesPath);
const cursorRulesContent = fs.readFileSync(cursorRulesPath, "utf8");
fs.writeFileSync(targetCursorRulesPath, cursorRulesContent);
console.log(
`${pc.green("✓")} Added .cursorrules file for Cursor.ai integration`
`${pc.green(
"✓"
)} Added template-specific .cursorrules file for Cursor.ai integration`
);
} else {
console.warn(`No .cursorrules file found for ${variant} template`);
}
} catch (error) {
console.warn("Failed to copy .cursorrules file:", error);
console.warn(
`Failed to copy .cursorrules file for ${variant} template:`,
error
);
}
} else {
console.log(`${pc.yellow("⚠")} Adding .cursorrules file skipped`);
Expand Down

0 comments on commit 1a80e86

Please sign in to comment.