Skip to content
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

Closed
wants to merge 5 commits into from
Closed

add jsx input ext #458

wants to merge 5 commits into from

Conversation

a-x-
Copy link

@a-x- a-x- commented Jun 5, 2019

closes #456

or, it might be better to add --exts otp

@codecov-io
Copy link

Codecov Report

Merging #458 into master will not change coverage.
The diff coverage is 0%.

Impacted file tree graph

@@          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
Impacted Files Coverage Δ
src/cli.ts 0% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 64b6332...71c3af2. Read the comment docs.

Copy link
Owner

@alangpierce alangpierce left a 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"]
Copy link
Owner

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?

Copy link
Author

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

@alangpierce
Copy link
Owner

#448 just landed, so closing this out. I'll give both of you credit in the release notes.

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.

support customizing input extensions. e.g. jsx
3 participants