Upgrade Gulp 3 to Gulp 4 the gulpfile.js workflow
Gulp 4 has been released for a while and has been a more modern version for efficient builds with parallel or series automated tasks.
I have used Gulp Version 3.9.* and it has greatly impacted my project's workflow. After version 4.* was released, the gulpfile.js needs some adjustments to fit into the latest updated gulp dependencies. Before that you can check the project sample using gulpfile.js version 3.9.* on my other post or scan the source code and the preview.
Gulp 3 Gulpfile.js settings :
In the root directory run $ gulp
on the terminal for running Gulp v.3.9.*
Gulp 3 default output :
Gulp 4 Gulpfile.js settings :
In the root directory run $ gulp watch
on the terminal for running Gulp v.4.*
Gulp 4 has some new function that allows you to run on parallel and series tasks that become more efficient and robust asset builds. See the Gulp 4 source code sample for more details information about the gulpfile.js upgraded version. Check the preview on the generated HTML builds from our /build folder using Gulp 4.
Gulp 4 default output :
Notes :
These gulpfile.js settings were just one of my practical experiences using both Gulps in versions 3 and 4 in my projects. These settings were optimized in development mode. There are many ways out there that are more practical, efficient also mind-blowing gulpfile.js settings on development and production modes. It is your advantage to explore, combine and understand how Gulp fits your needs and project workflows.
Read also:
Thank you for stopping by, I hope this will help you with your Web Development environment. Please do not forget to follow me to get into Web Development tips and tricks.
Thank you for dropping by and happy Gulping!