Gulp

Automate painful or time-consuming tasks in your development workflow, so you can stop messing around and build something using Gulp

Requirements

In order to use Gulp you will need to download Node JS. If you do not have Node installed already, you can get it by downloading the package installer from the official website. Please download the stable version of Node.js (LTS).

Download Node JS

Installation

After Node is installed on your system you can now proceed to Gulp installation. To do that simply run the following command in your terminal. This will install Gulp globally. Aferwards you can cd to you project’s folder where Purpose is installed.

npm install gulp-cli -g

Once the path of your workflow is changed to your project’s folder, where Purpose is installed, we have to install all the packages needed in order for Gulp to run correctly:

npm install

Now everything is installed and ready to work for you. If you open gulp.js you can see what packages are used in order to create the dist folder.

Running Gulp

For development we set a Gulp command that will compile the sources to dist then start a local Browsersync instance on port 3000 to serve and auto-refresh your pages as you edit.

gulp

For production we set a Gulp command that will compile and minify the CSS and JS files ready to be included in your project

gulp build