ericclemmons/grunt-react

Update to use react-tools 0.12.0

zbyte64 opened this issue · 3 comments

Currently the tool uses 0.11 regardless if you have 0.12 installed

A couple of options:

  1. Update the dependencies in package.json? That'd be easiest.
  2. Allow your Gruntfile.js to pass in a reference to react-tools in this task.

Because this is where it's referenced:

https://github.com/ericclemmons/grunt-react/blob/master/tasks/react.js#L13

There's not really an easy way for my package to reference your package, is there?

Option 1 seems to be best...

Unfortunately, Option 1 won't be sufficient, as there are a few breaking changes, at least as far as your tests are concerned. Two breaking changes I saw right away:

  • .js files will get transformed if run through react. This is most likely due to the dropped requirement of the /** @jsx React.DOM **/ annotation
  • <p>Hello</p> no longer gets compiled to React.DOM.p(null, "Hello"), but rather React.createElement("p", null, "Hello")

I've created pull request #40 to update the react-tools dependency. I include a version change from 0.9.0 to 0.10.0 because of the breaking changes introduced in react tools v0.12.0

Closing in favor of #40