-
Notifications
You must be signed in to change notification settings - Fork 143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add jsx input ext #458
add jsx input ext #458
Conversation
Codecov Report
@@ Coverage Diff @@
## master #458 +/- ##
======================================
Coverage 81.5% 81.5%
======================================
Files 50 50
Lines 5412 5412
Branches 1208 1207 -1
======================================
Hits 4411 4411
Misses 706 706
Partials 295 295
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Sorry, I've been meaning to get to #448 , which is nearly the same. Just one tweak that would be good for you to make, very similar but for TypeScript (which actually forces the tsx extension for files with JSX syntax).
@@ -75,7 +75,9 @@ async function buildDirectory( | |||
outDirPath: string, | |||
options: CLIOptions, | |||
): Promise<void> { | |||
const extension = options.sucraseOptions.transforms.includes("typescript") ? ".ts" : ".js"; | |||
const extensions = options.sucraseOptions.transforms.includes("typescript") | |||
? [".ts"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add .tsx
here as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, I thinked about and I was not sure
#448 just landed, so closing this out. I'll give both of you credit in the release notes. |
closes #456
or, it might be better to add --exts otp