New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

gulp-svg2z

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulp-svg2z

Gzip SVG vector graphics files with Gulp

  • 1.0.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
21
increased by31.25%
Maintainers
1
Weekly downloads
 
Created
Source

gulp-svg2z

Gzip SVG vector graphics files with Gulp

Will pass-through any non-svg files unaltered so you can use in conjuction with other image optimzation tools if you don't want a separate task for different file formats.

Install

$ npm install --save-dev gulp-svg2z

Usage

var gulp = require('gulp'),
    svg2z = require('gulp-svg2z');

gulp.task('default', function() {

    gulp.src('src/img/*')
        .pipe(svg2z())
        .pipe(gulp.dest('dest/img'));
});

Options

Options are passed directly to zlib. Details can be found here.

Only default is compression level set to max. {level: 9}

Extra Credit

For extra (very small) savings on file size, use in conjuction with gulp-svgo (or any other svgo optimization). If every byte counts, this is an easy way to up the savings, but be aware that this probably wont make a huge impact on your compression.

Example
var gulp = require('gulp'),
    svgo = require('gulp-svgo'),
    svg2z = require('gulp-svg2z');

gulp.task('default', function() {

    gulp.src('src/img/*')
        .pipe(svgo())
        .pipe(svg2z())
        .pipe(gulp.dest('dest/img'));
});

Keywords

FAQs

Package last updated on 12 Jan 2017

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc