Chapter 1. Introducing Gulp
Development always starts off simple. You come up with a great idea and then plan out how to build it. Quickly, you scaffold your project structure and organize everything to perfection. As you progress, your small idea starts to grow into a much larger application. You soon realize that your project has become large and unwieldy, and to remedy this, you perform a series of little mundane operations each time you modify your code to keep it small and efficient. Suddenly, all of these repetitive tasks only seem to get in your way and slow you down. You tell yourself that there must be a better way.
The good news is, you are absolutely right. The solution to this development obstacle lies in utilizing build systems. They are some of the most valuable tools in a developer's toolbox, and if you've never used one before, you're soon going to wonder how you ever worked without one.
In software development, build systems such as Make were initially used to compile code into executable formats for use in an operating system. However, in web development, we have a completely different set of practices and operations to contend with. Over the past few years, the growth of the Web has led to an increasing interest in using build systems to more capably handle the growing complexities of our applications and project workflows.
As developers, it is important for us to anticipate these growing complexities. We must do all that we can to improve our workflows so that we can build efficient projects that allow us to focus on what we do best, write great code.
In this book, we are going to explore Gulp, one of the most popular JavaScript build systems available today. Instead of dropping you right into the code, we will break apart the learning process into simple, understandable chunks that can be easily consumed and referenced if you get hung up at any point. All that you need to follow along is a general understanding of web development and how to write basic HTML, CSS, and JavaScript.
The first step toward using build systems is quite often viewed as the most intimidating, and understandably so. For years, I viewed the command line as a tool that was only beneficial to programmers and system administrators. I even resisted learning about Node.js because I feared the amount of time and dedication required to study it would be greater than how much I could actually benefit from it.
These feelings of intimidation and resistance are completely normal and are felt by many developers just like you. We are overwhelmingly exposed to new tools and frameworks on a daily basis. It is our responsibility as developers to evaluate these tools to determine their overall value based on the time investment required to implement them in our projects. When it comes to some tools, developers simply don't dig deep enough to identify the parts that might be useful to them.
I've come to realize that these things aren't as complicated as we sometimes make them, but many developers are still psyching themselves out before they even get started. It's important to remember that while these tools may feel quite foreign at first, they are not beyond your grasp and understanding.