Commit Graph

13 Commits

Author SHA1 Message Date
Paul O’Shannessy 91562ba934 Sync JSX tags from upstream
This is the other part of fc5f7e0e85. This
file isn't part of our sync process so needs to be done separately.
2013-07-08 12:51:11 -07:00
JeffMo 9c35189ad1 Add support for empty XJS expressions 2013-06-28 13:10:20 -07:00
petehunt 7053f59ad1 Remove second argument to invariant() 2013-06-23 21:58:59 -07:00
Ben Newman 000928f9dc Use recast.parse and .print for require("vendor/constants").propagate.
This removes the need to pass a callback, which is a nice improvement.
2013-06-17 16:30:32 -04:00
Ben Newman 0f87e8ee87 Rename Woodchipper-related stuff.
No functional changes introduced by this commit.

Renamed:

    woodchipper.js -> constants.js
    Woodchipper -> ConstantVisitor
    debranch -> propagate
2013-06-17 16:21:51 -04:00
Paul O’Shannessy c79a59b599 Improve JSXTransformer
The biggest improvement is that we'll now insert each parsed JSX script
back into a `<script>` tag with the body set. This allows the browser to
execute these scripts normally. Using `Function(functionBody)` or
`eval(functionBody)` both execute in window scope, but `var` assignments
don't actually get set on window (unlike everywhere else).

I also did some cleanup to make the code a little bit more readable.
In my minimal test cases this didn't break anything (scripts loaded in
the right order).
2013-06-17 10:52:16 -07:00
Paul O’Shannessy 06cff60bc1 Sync latest JSX transform - all children passed as separate arguments
This was a part of e1fe13d0cb upstream.
2013-06-13 18:18:54 -07:00
Ben Newman c740373b31 Fix some silly uses of Function.prototype.bind in jasmine-support.js. 2013-06-03 13:20:13 -04:00
Ben Newman 03f92bb155 Polyfill Function.prototype.bind during tests. 2013-06-03 13:20:13 -04:00
Ben Newman f8af93237a Use bin/jsx and browserify to build a jasmine bundle. 2013-06-03 13:20:13 -04:00
Paul Seiffert 510ced1d13 Removed duplicate object type check 2013-05-31 07:13:49 +02:00
Paul Seiffert b03f04ff24 Fixing Bug in JSX transformer
The bug fixed by this commit prevented the correct parsing of
`var` statements with multiple variables being declared. Instead
of trying to parse a whole 'variable declarations' (a `var`
statement with all its declarations), this visitor now only
parses single 'variable declarators'.
2013-05-30 20:51:15 +02:00
Paul O’Shannessy 75897c2dcd Initial public release 2013-05-29 12:54:02 -07:00