Gulp Get Started


Gulp is javascript task runner like Grunt
Grunt has a lot of features and, Grunt is used by node express project or yeoman etc…
Gulp is simple and suit for small project.

I use gulp for just simple web contents, I would like to uglify css, javascript and test on the local machine.

Install Gulp

Using gulp, we need to install following

  • node
  • gulp

About node, please look node
After installation node, install gulp using node

npm install -g gulp

Project with gulp

Let’s make project with gulp

|- package.json
|- gulpfile.js
|- node_modules  (make automatically)

package.json is node package management file
You can manage gulp plugin like gulp-connect, gulp-cssmin etc…

Super simple example for gulp

This is node simple server task.
Install some gulp plugin

npm install gulp-connect --save
var gulp = require("gulp"),
  connect = require('gulp-connect');
gulp.task('connect', function() {
      root: '.',
      port: 8080