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

Update tooling docs to suggest babel #4546

Merged
merged 1 commit into from
Aug 20, 2015
Merged

Conversation

rgbkrk
Copy link
Contributor

@rgbkrk rgbkrk commented Aug 2, 2015

@facebook-github-bot
Copy link

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla - and if you have received this in error or have any questions, please drop us a line at cla@fb.com. Thanks!

@rgbkrk
Copy link
Contributor Author

rgbkrk commented Aug 2, 2015

Done deal.

@facebook-github-bot
Copy link

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

@@ -32,11 +32,41 @@ If you like using JSX, we provide an in-browser JSX transformer for development

### Productionizing: Precompiled JSX

If you have [npm](https://www.npmjs.com/), you can simply run `npm install -g react-tools` to install our command-line `jsx` tool. This tool will translate files that use JSX syntax to plain JavaScript files that can run directly in the browser. It will also watch directories for you and automatically transform files when they are changed; for example: `jsx --watch src/ build/`.
If you have [npm](https://www.npmjs.com/), you can run `npm install -g babel`. `babel` has built-in support for React v0.12 and v0.13. Tags are automatically transformed to their equivalent `React.createElement(...)`, `displayName` is automatically inferred and added to all React.createClass calls. It's completely compatible with the original ([though deprecated](https://facebook.github.io/react/blog/2015/06/12/deprecating-jstransform-and-react-tools.html)) JSX/React transformer even down to whitespace handling.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's just drop the last sentence here – no one will remember react-tools in a few months anyway.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done deal.

@sophiebits
Copy link
Collaborator

Thanks! Can you link to http://babeljs.io/docs/usage/browser/ instead of JSXTransformer.js too?

@rgbkrk
Copy link
Contributor Author

rgbkrk commented Aug 20, 2015

Linked to the browser page on babeljs as well, though it doesn't provide a download link (so I had to reword the section).

@rgbkrk
Copy link
Contributor Author

rgbkrk commented Aug 20, 2015

All done with revisions. Thanks @spicyj!

@sophiebits
Copy link
Collaborator

Awesome work. Do you mind squashing your commits together?

@rgbkrk
Copy link
Contributor Author

rgbkrk commented Aug 20, 2015

Not a problem at all. I'll squish and report back.

@rgbkrk
Copy link
Contributor Author

rgbkrk commented Aug 20, 2015

All set!

sophiebits added a commit that referenced this pull request Aug 20, 2015
Update tooling docs to suggest babel
@sophiebits sophiebits merged commit cd268fd into facebook:master Aug 20, 2015
@sophiebits
Copy link
Collaborator

Thank you @rgbkrk!

@zpao
Copy link
Member

zpao commented Aug 20, 2015

Would you be interested in doing a scan of the rest of our docs and see where else we are talking about using JSXTransformer (and text/jsx) and see if we can update those too? We should be consistent with our communication here. If not, I'll probably do a pass later tonight.

@rgbkrk rgbkrk deleted the patch-1 branch August 20, 2015 21:21
@rgbkrk
Copy link
Contributor Author

rgbkrk commented Aug 21, 2015

A quick pass shows fixes certainly need to be made in the Japanese and Korean versions of the docs, but I certainly can't fix those. 😉

I've got to run so I can't scan this evening.

runs off and doesn't click [Comment], forever leaving this in draft state

Apparently I had to run so quick that I left this comment but didn't submit it. Sorry!

Were you able to get to this @zpao?

@zpao
Copy link
Member

zpao commented Aug 21, 2015

I started to and I can finish it up today (I'm going to make some other related changes so will try to get them all in together).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants