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.
Last week, we set up a simple gulp task to convert Sass into CSS. We also touched on how to watch the
styles.scss file for changes and how to reload the browser automatically with Browser Sync.
In this article, we’re going to dive further into the
sass task to find out how to watch more than one file for changes, and how to customize options for the plugins that we have used.
Let’s get started.
Gulp is a build tool that helps you automate your development workflow. In this article, we will dive deep into Gulp to show you how to use it effectively to create a simple workflow.
Let’s get started.
I wrote about configuring Grunt to use LibSass with Susy in the last article and feedback has been amazing. There were multiple requests for me to write another article to use LibSass with Gulp instead, so here it is :)