Currently, bin/jsx defaults to looking for .js files to which contain jsx content to compile. Whilst it's possible to override this using jsx -x jsx ..., I think that since jsx content is not valid JavaScript, using the .js extension by default isn't ideal.
Could we change bin/jsx to look for .jsx files instead?
Another advantage to this is that the generated .js files can live the same directory as the source .jsx. This simplifies the generation of source maps files as well, because the path to the .jsx is trivially relative to the generated .js
For example, given foo.jsx, running jsx . . would result in:
$ ls
foo.jsx
foo.js
foo.js.map
Currently, bin/jsx defaults to looking for
.jsfiles to which contain jsx content to compile. Whilst it's possible to override this usingjsx -x jsx ..., I think that since jsx content is not valid JavaScript, using the.jsextension by default isn't ideal.Could we change
bin/jsxto look for.jsxfiles instead?Another advantage to this is that the generated
.jsfiles can live the same directory as the source.jsx. This simplifies the generation of source maps files as well, because the path to the.jsxis trivially relative to the generated.jsFor example, given
foo.jsx, runningjsx . .would result in: