-
Notifications
You must be signed in to change notification settings - Fork 38
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
Use transform directly rather than shelling out #2
Conversation
Thanks Pete! This looks similar to the browserify code in the library, which makes me feel much better about how I solved that :) I'll dig into why the test is failing & update accordingly... |
@ericclemmons So I think that Node changed the spec of readFileSync() at some point, so the local version of Node I was running is different than the one in Travis. I've updated the branch with a workaround. |
I'm guessing it had something to do with readFileSync returning a buffer? It looks like you force-pushed over the previous commit, so I can't readily tell what the difference was (that sounds like something important to know) :( |
Oh sorry! I thought you would want a single commit. I changed Now there is a new problem with jenkins, but it doesn't look related to this change. I think it is because react-tools expects to be installed globally? Maybe? I don't know npm that well. |
Fixed! This was a bug in node v0.8 which prevented react-tools from installing correctly: https://github.com/isaacs/npm/issues/2907 |
I did have one last question, since I've normally supported v0.8 with my plugins since that's the base version supported by gruntjs: Do you mind if I amend to your BR to make it BC compatible with ~v0.8 as well as ~v0.10? |
Sure, but keep in mind that react-tools had issues installing itself on older versions of node. See facebook/react#132 |
Ooh, then that's fair enough. I guess we have to support the maximum between react & grunt, which is v0.10.0 Makes sense to me! Eric Clemmons On Sunday, June 30, 2013 at 8:19 PM, petehunt wrote:
|
To be clear, the code in React and my changes to grunt-react itself doesn't do anything specific to v0.10, it's just how react-tools specifies dependencies (so npm install fails on some earlier versions of Node). So the change to .travis.yml without changes to package.json is the right way to go, IMO. Anything else I can do or address to get this landed? I am basing the Rendr+React integration (https://github.com/petehunt/rendr-react-template/) on this project and I think this pull is required to get it working. Thanks for your hard work! |
I was just merging this down now, but thought about how to test the Let me know what the best strategy is & I'll get it done! |
|
Thanks Eric! I had just done manual testing for ignoreMtime, with the way fixtures are set up currently I think it's kind of hard to test. Maybe integrating a way to generate fixtures programmatically would be easiest? This project rocks :) |
Glad you like it! If you can tell me how you manually tested, I can setup the fixture. And yea, I'm not quite a fan of testing in grunt, and everytime i write new tests its a crapshoot :) |
I basically ran it on multiple files, changed one file, and looked at the file mtimes to be sure only the changed file was updated. |
Oh, I can build a test around that! |
Changes Unknown when pulling 57d4186 on petehunt:use-transform into * on ericclemmons:master*. |
The shell command does a lot more than just desugaring; this makes the transform much, much simpler and saves you extra processes.