gulp-svgmin npm package of node.js


Overview

This is a plugin for gulp which is used to minify the svg files.

Code


													
var gulp = require('gulp');
var svgmin = require('gulp-svgmin');
 
gulp.task('default', function () {
    return gulp.src('source/image.svg')
        .pipe(svgmin())
        .pipe(gulp.dest('./dest'));
});
													
												

Run

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