Created
February 7, 2025 17:39
-
-
Save sourman/04f2a633a8409225cada2d0521938a86 to your computer and use it in GitHub Desktop.
.cursorrules nextjs file structure update script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
tree -I 'tree.tmp|*.tar.gz|desktop.ini|*.pkl|delete_me|node_modules|.vscode|*.tsbuildinfo|next-env.d.ts|.env*|*.log|.vercel|build|' > tree.tmp && awk ' | |
BEGIN {in_tree_section = 0} | |
/START_TREE/ { | |
print "START_TREE" | |
print "```" | |
system("cat tree.tmp") | |
print "```" | |
print "END_TREE" | |
in_tree_section = 1 | |
next | |
} | |
/END_TREE/ {in_tree_section = 0; next} | |
!in_tree_section {print} | |
' .cursorrules > .cursorrules.tmp && mv .cursorrules.tmp .cursorrules && rm tree.tmp |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment