shellscape / jsx-email

Build emails with a delightful DX
https://jsx.email
MIT License
902 stars 28 forks source link

allow email preview to open in a different browser than Chrome by default, or just print a url #65

Closed osdiab closed 8 months ago

osdiab commented 8 months ago

Expected Behavior / Situation

I dont use Chrome as my main browser. When I run pnpm exec email preview I want it to either just print the URL, or open my actual default browser

Actual Behavior / Situation

It opens Chrome every time

Modification Proposal

osdiab commented 8 months ago

oh, looks like it already has this:

https://github.com/shellscape/jsx-email/blob/dbeb481d28b3f5d107f82e61a982a43a10aa0f89/packages/cli/src/commands/preview.ts#L29

just it doesn't show in the help text if you use --help, you have to use email help preview to see the help text.

shellscape commented 8 months ago

When you say that it doesnt show in the help text, what did you mean? On the console/terminal?

osdiab commented 8 months ago

what i mean is that i expected the --help terminal flag to show help text for a command, like email preview --help would show help text for the preview command, but it doesn't; that flag just gets ignored and is as though I just ran email preview, and then rather than telling you the usage of the preview command it just gives some generic output that doesn't tell you what flags are present for this command.

if you want to see help text for the preview command you need to call email help preview. so it's just that the CLI doesn't behave like other CLI tools I use.

shellscape commented 8 months ago

it's a very common pattern. So common that I'd bet you use a CLI everyday that uses the same pattern ;) https://git-scm.com/docs/git-help

The CLI docs https://jsx.email/docs/core/cli also show the email help command

osdiab commented 8 months ago

@shellscape but git commit --help does show you help about the commit command.

email preview --help shows you nothing helpful about the preview command.

osdiab commented 8 months ago

anyway, yeah, not a big deal but just saying that i didn't find that intuitive.