Gulp What’s new in 4.0?!

Gulp is a tool that helps you out with several tasks when it comes to web development. It’s often used to do front end tasks like: Spinning up a web server. Reloading the browser automatically whenever a file is saved

Gulp.js 3.x has been the default for around half a decade. Until recently, npm install gulp would have installed 3.9.1 — the version referenced in the tutorials above.

Gulp.js 4.0 has been available throughout that time, but had to be explicitly installed with npm install gulp@next. This was partly owing to ongoing development and because Gulp.js 4 gulpfile.js configuration files are not compatible with those developed for version 3.

On December 10, 2018, Gulp.js 4.0 was announced as the default and published to npm. Anyone using npm install gulp on a new project will receive version 4.

The task system was rewritten from the ground-up, allowing task composition using series() and parallel() methods

The watcher was updated, now using chokidar (no more need for gulp-watch!), with feature parity to our task system

First-class support was added for incremental builds using lastRun()

A symlink() method was exposed to create symlinks instead of copying files

Built-in support for sourcemaps was added — the gulp-sourcemaps plugin is no longer necessary!

Task registration of exported functions — using node or ES exports — is now recommended

Custom registries were designed, allowing for shared tasks or augmented functionality

Stream implementations were improved, allowing for better conditional and phased builds

One thought on “Gulp What’s new in 4.0?!

Leave a Reply

Your email address will not be published. Required fields are marked *