Book Image

Getting Started with Gulp ??? Second Edition - Second Edition

By : Travis Maynard
Book Image

Getting Started with Gulp ??? Second Edition - Second Edition

By: Travis Maynard

Overview of this book

This book is a hands-on guide to get you up to speed with gulp. You will quickly learn how to install, configure, and run your own build system. It will instill you with the ability to automate several common development tasks to vastly improve your development workflow. This book first demonstrates various Gulp use cases before running through the steps of configuring, running, and customizing Gulp, providing you with core concepts of gulp, node.js, and npm. Diving a bit deeper into the gulp ecosystem, we will discuss when and why to use a node module instead of a gulp plugin. We will also go over a few issues that we can run into while using gulp and learn about ways to work around them to improve your gulp experience. By the end of this book, you will be able to create your very own gulp build from scratch, create and maintain tasks and project builds, and automate your workflow with plugins and custom tasks.
Table of Contents (7 chapters)
Free Chapter
1
Introducing Gulp
2
Getting Started
3
Understanding the Basics of Gulp
4
Performing Tasks with Gulp
5
Creating Advanced Tasks
6
Tips, Tricks, and Resolving Issues

What this book covers

Chapter 1, Introducing Gulp, focuses on helping you understand the languages and tools that you will use. You will learn how to use Gulp to perform automated tasks for your development workflow.

Chapter 2, Getting Started, deals with getting your local environment set up by installing any software that is needed to move forward. You will learn how to use a command-line interface and take a look at the anatomy of a gulpfile.

Chapter 3, Understanding the Basics of Gulp, explains the basics of Gulp and how its various methods interact with one another to create a gulpfile. You will learn how to use npm to install plugins and prepare yourself with the necessary knowledge to write your own tasks and gulpfile.

Chapter 4, Performing Tasks with Gulp, demonstrates how to create a set of base tasks for handling common workflow processes such as concatenating, minifying, and pre-processing your files.

Chapter 5, Creating Advanced Tasks, explores ways to improve our gulpfile by introducing new tasks and modifying our previous tasks to be more robust. This chapter also covers when and why to use Node.js modules instead of Gulp plugins. You will learn how to create various tasks that will run a static server, sync your project files with your browser(s), and implement Browserify and Babel to take advantage of the latest JavaScript features.

Chapter 6, Tips, Tricks, and Resolving Issues, covers how to improve your tasks by adding better error handling, ordering your source files, and cleaning up your compiled code. Additionally, you will learn how to set up task dependencies, generate source maps, use an external config file, and even leverage Babel so that you can begin writing your gulpfiles using ES2015.