You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.
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.
Activity
AnSavvides commentedon Sep 23, 2015
If you don't mind me asking, I am curious, what influenced your decision to go with
gulp
overGrunt
?zertosh commentedon Sep 23, 2015
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.
zpao commentedon Sep 23, 2015
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.
AnSavvides commentedon Sep 24, 2015
Great - thank you both, this is very helpful!
nickdima commentedon Oct 16, 2015
Is there any in-progress fork that I could contribute to? I would like to help on this one if possible.
zpao commentedon Oct 19, 2015
@zertosh - do you have anything in progress to point to or would it be ok for @nickdima to pick this up?
zertosh commentedon Oct 20, 2015
@zpao, I won't be able to make any progress on this this week, so sure!
nickdima commentedon Oct 20, 2015
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.
zpao commentedon Oct 20, 2015
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.
flarnie commentedon Apr 4, 2017
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.
gaearon commentedon Apr 5, 2017
Both Grunt and Gulp are gone with #9327.
They shan’t be missed