
Gulp is very plugin driven if you want to accomplish something, you need to know which plugin to use. The pattern for writing tasks is that you first load a plugin you’re about to use and then define a task that is based on that plugin.
GULP LIVERELOAD INSTALL
Now we need to download Gulp and its plugins to our project: $ npm install -save-dev gulp Writing the First Gulp TaskĪll Gulp configuration goes in a file called gulpfile.js located at the root of the project. To use Gulp, you need to install it as a global module first through NPM: $ sudo npm install -g gulp-cli Note that Express has the capability of plugging into templating engines by itself, but Gulp gives us more flexibility and can do a lot more thanks to the hundreds of plugins available.

$ git push origin master Project Structure Create a new empty repository, we can call it “gulp-project”:.Head over to GitHub and login or sign up.

Create a starter application using express-generator: $ npx express-generator -v ejs -git gulp-projectĬreate a GitHub repository for the project: Setting up the Environmentīefore we can create and run our first task, we need to have something to work on. We will use Sass and EJS templates, but having deep knowledge of them isn’t required. In order to use Gulp, you need to have Node.js installed on your system. Gulp is a command-line tool, so you should be familiar with working in the terminal. Here’s a brief overview of the steps to get you started:
GULP LIVERELOAD HOW TO
We will make a quick project to demonstrate how tasks work, and how to create an integrated workflow.

The goal of this tutorial is to introduce Gulp and see it in action. This results in faster builds because there is no need to create and read intermediary files on the hard drive. It only needs to read a file once, then process it through multiple tasks, and finally write the output file. What makes Gulp different from other task runners is that it uses Node streams piping output from one task as an input to the next. Gulp let us automate processes and run repetitive tasks with ease. Gulp is a command-line task runner for Node.js.
