@@ -392,20 +392,20 @@ const runGenerator = (context, {outputDir, templateVersion, verbose}) => {
392392 }
393393
394394 // Copy the .cursor/rules directory if it exists
395- // if (sh.test('-e', CURSOR_RULES_FROM_DIR)) {
396- // const outputCursorRulesDir = p.join(outputDir, '.cursor', 'rules')
397-
398- // // Create the directory if it doesn't exist
399- // if (!sh.test('-e', outputCursorRulesDir)) {
400- // fs.mkdirSync(outputCursorRulesDir, {recursive: true})
401- // }
402-
403- // // Copy the contents of CURSOR_RULES_FROM_DIR to outputCursorRulesDir
404- // const files = fs.readdirSync(CURSOR_RULES_FROM_DIR)
405- // files.forEach((file) => {
406- // sh.cp('-rf', p.join(CURSOR_RULES_FROM_DIR, file), outputCursorRulesDir)
407- // })
408- // }
395+ if ( sh . test ( '-e' , CURSOR_RULES_FROM_DIR ) ) {
396+ const outputCursorRulesDir = p . join ( outputDir , '.cursor' , 'rules' )
397+
398+ // Create the directory if it doesn't exist
399+ if ( ! sh . test ( '-e' , outputCursorRulesDir ) ) {
400+ fs . mkdirSync ( outputCursorRulesDir , { recursive : true } )
401+ }
402+
403+ // Copy the contents of CURSOR_RULES_FROM_DIR to outputCursorRulesDir
404+ const files = fs . readdirSync ( CURSOR_RULES_FROM_DIR )
405+ files . forEach ( ( file ) => {
406+ sh . cp ( '-rf' , p . join ( CURSOR_RULES_FROM_DIR , file ) , outputCursorRulesDir )
407+ } )
408+ }
409409
410410 // Install dependencies for the newly minted project.
411411 npmInstall ( outputDir , { verbose} )
0 commit comments