Template Engines are tools that help us break HTML code into smaller pieces that we can reuse across multiple HTML files. They also give you the power to feed data into variables that help you simplify your code.
However, with Node.js, we can now harness the power of template engines easily through the use of tools like Gulp.
That’s what we’re going to cover today in this chapter. We’re going to find out what template engines are, why we should use them, and how to set one up with Gulp.
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
Using preprocessors like Sass or LESS
This is not a comprehensive list of things Gulp can do. If you’re crazy enough, you can even build a static site generator with Gulp (I’ve done it!). So yes, Gulp is extremely powerful, but you’ll have to learn how to use Gulp if you want to create your own customized build processes.
So that’s what this article is for. It helps you get so good with the basics of Gulp that you can begin exploring everything else for yourself.
Choosing to use one tool over another is one of the largest challenges developers face. Regardless of what you’re choosing, be it a code editor, a framework, or even a build tool. It’s never an easy decision.
When it comes to build tools, the two most popular options right now are Grunt and Gulp. But are these the only two you should choose from? If not, what other choices do you have?
Two weeks ago, I said I wanted to write about a new topic in addition to Susy. I had 3 major themes in mind and wanted to find out if you’d be interested in them. So I posted up a survey and asked for feedback.
After two weeks of non-stop email interviews, as well as from the survey results, I’m happy to announce that I’ve came to a conclusion on what to write about next.