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

Enable JSX support via setting Esprima's and TypeScript's JSX flag #83

Open
brentlintner opened this issue Jun 7, 2017 · 0 comments
Open

Comments

@brentlintner
Copy link
Owner

brentlintner commented Jun 7, 2017

A simple cli flag and lib option should be easy to implement.

http://esprima.readthedocs.io/en/latest/syntactic-analysis.html#jsx-syntax-support

Note: escodegen will die if --jsx is set, so that complicates things.

estools/escodegen#333

Note: If we use babylon to parse, we can use things like https://www.npmjs.com/package/babel-generator (see #94).

Note: Also should pick up files with .jsx

Note: Perhaps astring/astring-jsx is worth checking out for codegen (https://www.npmjs.com/package/astring). -- astring-jsx has some preliminary issues when testing simple file

UPDATED NOTE: try https://github.com/wallabyjs/escodegen? (see if it supports template strings too like javascript-obfuscator fork used)

@brentlintner brentlintner changed the title Enable JSX support via setting Esprima's jsx flag Enable JSX support via setting Esprima's and TypeScript's JSX flag Jun 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant