Closed ruscoder closed 8 years ago
Hey, this looks awesome, thanks!
I'll check acorn-jsx
and merge the PR if everything looks okay. Any reason not using Espree which supports all accepted ES6 features + JSX and is built on top of Acorn itself?
I just confirmed, by running this in one of my projects, that this appears to work exactly as advertised! Thank you @ruscoder!
@ruscoder - can you respond to my Espree question which is a single parser interface compared to the acorn + acorn-jsx solution in this patch?
Also you did some unrelated stylistic changes to the file. Can you revert them? Not that I like the existing style but I'd rather not change them to keep the diff as clean as possible. I plan to tidy up the styles by introducing ESLint at some point.
@BYK I haven't seen Espree before. Would you like to use Espree instead of acorn + acorn-jsx?
OK, I'll revert stylistic changes and notify you.
@ruscoder - if you didn't know about Espree it is okay to keep this as is. I mostly wanted to learn your reasoning behind choosing acorn-jsx over that assuming you knew about it :)
Since this works along with tests I can always switch it to Espree in the future safely. So just revert the stylistic changes and I'll merge this away.
Thanks!
@BYK I've updated pull request.
Released 0.9.0
Fantastic - thank you both! I've upgraded my app to v0.9.0
and it works great.
I've implemented support for JSX using acorn-jsx. Tests are included.