Skip to content

Use Babel to transform JS #292

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

Closed
zpao opened this issue Jun 10, 2015 · 2 comments
Closed

Use Babel to transform JS #292

zpao opened this issue Jun 10, 2015 · 2 comments

Comments

@zpao
Copy link
Member

zpao commented Jun 10, 2015

We're going to deprecate JSXTransformer and probably not ship any more versions of it. We've already switched the React build process to use Babel and we're going to encourage others to as well. It would make sense for react-rails to follow suit. It would also fix issues like #278.

The babel-transpiler gem looks like it should be pretty easy to drop in. https://github.com/babel/ruby-babel-transpiler

@rmosolgo
Copy link
Member

Sounds good, it should be a pretty straight-forward swap.

  • Implement a BabelTransformer which implements #initialize(options) and #transform(code) (just like the existing Transformer)
  • Test BabelTransformer
  • Assign it to React::JSX.transformer =
  • Document the new jsx_transform_options
  • If we make it the default, make some warnings for people using the old options.

Any takers out there?? :)

@vipulnsward
Copy link
Contributor

I can give it a try

On Wednesday, June 10, 2015, Robert Mosolgo [email protected]
wrote:

Sounds good, it should be a pretty straight-forward swap.

  • Implement a BabelTransformer which implements #initialize(options)
    and #transform(code) (just like the existing Transformer)
  • Test BabelTransformer
  • Assign it to React::JSX.transformer =
  • Document the new jsx_transform_options
  • If we make it the default, make some warnings for people using the
    old options.

Any takers out there?? :)


Reply to this email directly or view it on GitHub
#292 (comment)
.

Vipul A.M.
+91-8149-204995

vipulnsward added a commit to vipulnsward/react-rails that referenced this issue Jun 11, 2015
… ruby-babel-transpiler

- Make new BabelTransformer the default transformer
- README changes to reflect new Babel Transformer
- Added deprecation warning for usage of old transformer options
- Move old transformer to JSXTransformer
- Fixed  component generator test after changes to new transformer

Fixes reactjs#292, reactjs#278
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

No branches or pull requests

3 participants