facebook/react — pull request #1613 by popham (2014-05-28 04:06:16+00:00)
Title: Resolves #417

I've addressed most of the commentary from #417 for a RequireJS example.

* I've ignored a suggestion for a `data-main` on the RequireJS `script`. I prefer the chosen implementation because it allows parametrization of the app's insertion point in the html source--with a data-main as described, the insertion point would be hard-coded in a Javascript file.
* The jsx precompiler expects a `React` namespace, so `define` and `require` must import the React build as `React`. This is a little ugly, but it's mentioned in the example's page.
* I personally prefer CurlJS, which has no jsx plugin, and I'm not sufficiently interested to implement my own. Looking at `require-jsx`, I don't see sufficient quality to warrant inclusion (after a quick look, I see that `package.json` defines `main : jmx.js`, not the `jsx.js` that actually exists; I see a bunch of workarounds without tests; and I feel that the necessary configuration is too verbose). I don't think that official examples should reference this software in its current form, and I'm not interested in fixing it.
* I've `/* global define */` qualified AMD modules to appease JSHint. Should this stuff be somewhere else?
* The example page mentions the image of a precompile step. This image is not under version control, but an earlier step generates it. Should the image(s) be under version control too? Should the reference get removed from the page itself? Is it okay as is?