facebook/react — pull request #217 by jakubmal (2013-07-20 13:18:36+00:00)
Title: Allow to execute JSXTransformer outside of browser environment

Hi guys,
Great job! React is awesome.

A little PR incoming...

I'm not sure if I correctly guessed that
```
if (typeof window === "undefined" || window === null) {
return;
}
```
is there to allow JSXTransformer.js to run outside of browser environment. If so, then it's necessary to move reference to document to be after this if. Also it might be nice to have a regression for this.

Otherwise, any hints on how to prepare non-browser non-node build of JSXTransformer? I'm working on a gem to simply compile jsxes server side in rails (sprockets engine). If you think it suits this repo then I can PR it too.