Socket
Socket
Sign inDemoInstall

gulp-svgmin

Package Overview
Dependencies
98
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    gulp-svgmin

Minify SVG files with gulp.


Version published
Maintainers
1
Install size
2.51 MB
Created

Changelog

Source

1.0.0

  • svgmin takes an options object now, instead of a list of plugins.

Readme

Source

gulp-svgmin Build Status NPM version Dependency Status

Minify SVG with SVGO.

If you have any difficulties with the output of this plugin, please use the SVGO tracker.

Install via npm:

npm install gulp-svgmin --save-dev

Example

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

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

Plugins

Optionally, you can disable any SVGO plugins to customise the output. You will need to provide the config in comma separated objects, like the example below.

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

Contributing

Pull requests are welcome. If you add functionality, then please add unit tests to cover it.

License

MIT © Ben Briggs

Keywords

FAQs

Last updated on 08 Dec 2014

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc