Skip to content

yocontra/gulp-svgmin

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gulp-svgmin

Minify SVG files with gulp. This plugin is a small wrapper around the excellent SVGO module, which can be found here:

https://github.com/svg/svgo

Installation

Install via npm:

npm install gulp-svgmin --save-dev

Example

var gulp = require('gulp');
var svgmin = require('gulp-svgmin');

gulp.task('default', function() {
    gulp.src('logo.svg')
        .pipe(svgmin())
        .pipe(gulp.dest('./out'));
});

Plugins

Optionally, you can disable any SVGO plugins to customise the output. Simply pass an object to svgmin with the list of plugins that you would like to disable:

gulp.task('default', function() {
    gulp.src('logo.svg')
        .pipe(svgmin({
            removeDoctype: false
        }))
        .pipe(gulp.dest('./out'));
});

About

Minify SVG files with gulp.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%