Our build process sort of resembles Frankenstein's monster at this point. My bad. We shouldn't shell out to gulp from grunt and move utils out to fbjs.
@zertosh is already working on this.
If you don't mind me asking, I am curious, what influenced your decision to go with gulp over Grunt?
I can't speak for @zpao's motivations, but as a personal preference, I find gulp easier to work with. gulp's programmatic stream api is easier to reason about than a bunch of grunt JSON abstractions. gulp's api is minimal – it's nothing more than a task runner with basic vinyl support. That does mean that less works out-of-the-box. However, I've found that this works out in the end because you end up using the Thing You Need directly, instead of through some assumption-laden plugin.
Once I wrapped my head around it, I just found gulp to be easier to work with. The streams match up better with the way I was thinking about the process. We'll likely lose a couple of the nice things (like the compare_size task which was easy to configure and throw in) but we'll survive. A couple things also probably make more sense as explicit npm scripts. We'll see. The other goal was to align our open source tooling and others were interested in using gulp, which helped force us to look into it.
Both are great tools, we're just doing what hopefully will make the most sense for us.
Great - thank you both, this is very helpful!
Is there any in-progress fork that I could contribute to? I would like to help on this one if possible.
@zertosh - do you have anything in progress to point to or would it be ok for @nickdima to pick this up?
@zpao, I won't be able to make any progress on this this week, so sure!
I started looking into this, first trying to grasp everything that's going on with the build process and figuring out how to proceed.
Personally I'm a big fan of using npm scripts and skipping both grunt and gulp altogether, mostly for avoiding plugins that wrap around certain tools and using the tools themselves directly. But I'll see if this is fitted for React.
Meanwhile I opened this pull request for Babel that React could use in its compile step. I hope it gets merged.
Awesome, thanks @nickdima. The build process started out nice and clean 2.5 years ago but it's gotten unwieldy and confusing. I have a lot of the blame there so let me know if you have questions.
Please make use of gulp & the scripts we have in fbjs-scripts and go from there. npm scripts are definitely useful but let's mostly reserve that for one-offs and aliasing and otherwise use gulp. This is technology we're aligning on across our open source projects to reduce the project specific code and make it easier for each project to start and improve. Feel free to make any requests here and I'm happy to help.
I suspect that Babel won't take that PR but I could be mistaken. It could be useful but we've already solved that problem so I don't think it's too important in the grand scheme of this task.
Thanks @maxdeviant for your work on this - the build system definitely could benefit from improvement. @gaearon and @trueadm are working on rewriting it to eliminate both Gulp and Grunt in favor of Rollup, and that will close this issue.
Both Grunt and Gulp are gone with #9327.
They shan’t be missed
Most helpful comment
Thanks @maxdeviant for your work on this - the build system definitely could benefit from improvement. @gaearon and @trueadm are working on rewriting it to eliminate both Gulp and Grunt in favor of Rollup, and that will close this issue.