gulp-util npm package of node.js


Overview

This gulp plugin along with many other functionalities is used to generate logs.

Code


													
var gulp = require('gulp');		
var util = require('gulp-util');
var uglify = require('gulp-uglify');

gulp.task('ut' , function() {
	gulp.src('source/*.js')
	.pipe(util.log('got some files'))
	.pipe(uglify())
	.pipe(util.log('uglified them'))
	.pipe(gulp.dest('destination'));
	.pipe(util.log('sent in destination folder'))
});
        
													
												

Run

  • Now run the snippet using the following command :
    													
    $gulp ut