Skip to content

[Generator] cursor rules are now copied for any type of project#2754

Merged
vmarta merged 3 commits intodevelopfrom
move-cursor-rules-outside-extend
Jul 8, 2025
Merged

[Generator] cursor rules are now copied for any type of project#2754
vmarta merged 3 commits intodevelopfrom
move-cursor-rules-outside-extend

Conversation

@vmarta
Copy link
Contributor

@vmarta vmarta commented Jul 8, 2025

It used to be that the generator would copy over the cursor rules only if the user chooses extensibility for their project. Now regardless of their selection, we will still copy the cursor rules.

Related PR: #2578

How to test drive the PR

  1. From the monorepo root, run node packages/pwa-kit-create-app/scripts/create-mobify-app-dev.js --outputDir /tmp/generated-project to generate a new project
  2. When the generator ask you questions, choose to answer: using your own Commerce Cloud instance and a non-extensible project.
  3. Once the project is generated, verify that cursor rules exist in /.cursor/rules.

- Move cursor rules copying logic outside the 'if (extend)' conditional
- This ensures .cursor/rules directory is copied for all generated projects
- Previously only extended projects received cursor rules configuration
- Now all PWA Kit projects get consistent Cursor IDE settings
@vmarta vmarta requested a review from a team as a code owner July 8, 2025 18:13
@cc-prodsec
Copy link
Collaborator

cc-prodsec commented Jul 8, 2025

🎉 Snyk checks have passed. No issues have been found so far.

security/snyk check is complete. No issues have been found. (View Details)

license/snyk check is complete. No issues have been found. (View Details)

})

// Copy the .cursor/rules directory if it exists
if (sh.test('-e', CURSOR_RULES_FROM_DIR)) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This copying of cursor rules used to be run conditionally.. see line 342 above.

Copy link
Contributor

@yhsieh1 yhsieh1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks good. This change will help with any type of created app.

Copy link
Contributor

@snilakandan13 snilakandan13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

@vmarta vmarta enabled auto-merge (squash) July 8, 2025 18:53
@vmarta vmarta merged commit bf59a88 into develop Jul 8, 2025
36 checks passed
@vmarta vmarta deleted the move-cursor-rules-outside-extend branch July 8, 2025 19:32
kumaravinashcommercecloud pushed a commit that referenced this pull request Aug 12, 2025
* Move cursor rules copying outside extend block

- Move cursor rules copying logic outside the 'if (extend)' conditional
- This ensures .cursor/rules directory is copied for all generated projects
- Previously only extended projects received cursor rules configuration
- Now all PWA Kit projects get consistent Cursor IDE settings

* Update CHANGELOG.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants