Skip to content

Conversation

hosmelq
Copy link

@hosmelq hosmelq commented Oct 9, 2025

Add a --extension/-e flag to the CLI export command, document the new option, and add a test.

Related


Summary by cubic

Add a new --extension/-e flag to the export CLI to set a custom output file extension (e.g., blade.php). If omitted, it defaults to .txt with --plainText, otherwise .html; docs updated and tests added.

Copy link

changeset-bot bot commented Oct 9, 2025

🦋 Changeset detected

Latest commit: 9bd8014

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
react-email Minor
@react-email/preview-server Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

vercel bot commented Oct 9, 2025

@hosmelq is attempting to deploy a commit to the resend Team on Vercel.

A member of the Team first needs to authorize it.

@hosmelq hosmelq force-pushed the support-custom-export-extension branch from ecb743a to be8cc28 Compare October 9, 2025 17:01
@hosmelq hosmelq changed the title feat(export): Support custom export extension feat(export): support custom export extension Oct 9, 2025
Copy link

pkg-pr-new bot commented Oct 9, 2025

Open in StackBlitz

npm i https://pkg.pr.new/resend/react-email@2555

commit: be8cc28

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

1 issue found across 5 files

Prompt for AI agents (all 1 issues)

Understand the root cause of the following 1 issues and fix them.


<file name="packages/react-email/src/commands/export.ts">

<violation number="1" location="packages/react-email/src/commands/export.ts:121">
If the CLI receives a dot-prefixed extension (e.g., `--extension .html`), this ternary sets `extension` to `..html`, so exported filenames gain an extra dot (e.g., `example..html`). Please reuse the user-supplied dot when present so both dot-prefixed and bare extensions work.</violation>
</file>

Since this is your first cubic review, here's how it works:

  • cubic automatically reviews your code and comments on bugs and improvements
  • Teach cubic by replying to its comments. cubic learns from your replies and gets better over time
  • Ask questions if you need clarification on any suggestion

React with 👍 or 👎 to teach cubic. Mention @cubic-dev-ai to give feedback, ask questions, or re-run the review.

@hosmelq hosmelq changed the title feat(export): support custom export extension feat(react-email): support custom export extension Oct 9, 2025
@gabrielmfern gabrielmfern force-pushed the canary branch 3 times, most recently from 8128be7 to 19de23f Compare October 17, 2025 20:28
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.

1 participant