Chapter 8. Extending Gulp

 

This chapter covers

  • The well-maintained Gulp plugin ecosystem
  • How to deal with Gulp-unfriendly plugins
  • Stream-based tools and how to combine them with Gulp
  • Promises and their integration into the Gulp build system

JavaScript build tools usually provide just a core of basic functionality and API. The rest is handled by using a broad variety of plugins that use the existing functionality of other tools and wrap them to be compatible with the build software.

Gulp is no exception, as you’ve seen in the various examples in the previous chapters: the CSS preprocessor LESS has a Gulp relative called gulp-less, and the JavaScript minification tool Uglify is wrapped by gulp-uglify. For the creators of Gulp, having such a plugin system makes a lot of sense. Instead of having the burden of providing all the software to make all edge cases work, plugins offer a quick and easy way of integrating new tools and content transformers for the community.

8.1. The Gulp plugin blacklist

8.2. Integrating other stream-based tools

8.3. Integrate Promise-based tools

8.4. Summary