Skip to content

Commit

Permalink
fix(cursor): reference docs instead of copying general.md (#88) (#89)
Browse files Browse the repository at this point in the history
* fix(cursor): reference docs instead of copying general.md (#88)

Co-Authored-By: wqoy gqle <[email protected]>

* style: fix prettier formatting in generate_cursor.ts

Co-Authored-By: wqoy gqle <[email protected]>

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: wqoy gqle <[email protected]>
  • Loading branch information
devin-ai-integration[bot] and wqoy gqle authored Dec 27, 2024
1 parent 893cb71 commit 64c7eb0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/cursor-reference.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@umijs/tnf": patch
---

Replace file copying of general.md with a reference message in generate_cursor.ts for better user experience (#88)
7 changes: 5 additions & 2 deletions src/generate/generate_cursor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ export async function generateCursor(opts: GenerateCursorOpts) {
fs.existsSync(generalFilePath),
`General file not found at ${generalFilePath}, please run \`tnf sync\` first.`,
);
const general = fs.readFileSync(generalFilePath, 'utf-8');
fs.writeFileSync(cursorRulesPath, general, 'utf-8');
fs.writeFileSync(
cursorRulesPath,
'Please follow the docs in ./.tnf/docs/general.md',
'utf-8',
);
}

0 comments on commit 64c7eb0

Please sign in to comment.