react-email icon indicating copy to clipboard operation
react-email copied to clipboard

Add support for JSX file format as well via create-email

Open gokulkrishh opened this issue 3 years ago • 5 comments

Using this command, i am able to create starter email

npx create-email@latest

By default, above command create Component files in .tsx file format, it would be great if there is flag to enable the support for .jsx file format as well

Suggestion:

npx create-email@latest --jsx

Note: JSX file support is already in place via [#231]. Asking for flag to enable the creation of Components as jsx file.

gokulkrishh avatar Jan 31 '23 06:01 gokulkrishh

Nice, thanks for creating this @gokulkrishh.

I think we can have a typescript flag.

$ create-email
$ create-email --typescript

bukinoshita avatar Feb 01 '23 03:02 bukinoshita

@bukinoshita So by default .JSX and a flag for typescript. This would great.

gokulkrishh avatar Feb 01 '23 03:02 gokulkrishh

I would suggest to switch it around. Typescript by default, and .JSX as flag. Typescript is currently the default for most frameworks

bastiaanv avatar Feb 02 '23 14:02 bastiaanv

@bastiaanv I am not so sure about typescript being the default for most frameworks (Not trying to start a debate on typescript 😄).

For CRA and NextJS, we need to pass --typescript flag. Realised this after check the docs.

Would leave this decision to you people to decide.

gokulkrishh avatar Feb 02 '23 15:02 gokulkrishh

Yeah, I'd prefer having Typescript as default as well, but most libraries has JS as default instead of typescript. So I'd suggest going with jsx as default and in the example always show the typescript flag.

bukinoshita avatar Feb 06 '23 16:02 bukinoshita