Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gulp-zopfli-node

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulp-zopfli-node

Zopfli compressor for gulp

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
11
increased by57.14%
Maintainers
1
Weekly downloads
 
Created
Source

gulp-zopfli-node

a Zopfli plugin for gulp, based on zopfli-node.

Note: This is a fork of gulp-zopfli that hasn't been updated in a long time and uses an old version of node-zopfli (replaced by zopfli-node in this package).

NPM version Dependency Status devDependency Status

Install

npm install --save-dev gulp-zopfli

##Options

format String

Choose an output format, you can choose between gzip, zlib or deflate. Defaults to gzip.

 zopfli({ format: 'zlib' })

append Boolean

Appends .gz, .zz or .deflate file extension if true depending on the format chosen. Defaults to true.

 zopfli({ append: true })

threshold String|Number|Boolean

Minimum size required to compress a file. Defaults to false.

zopfli({ threshold: '1kb' })
zopfli({ threshold: 1024 })
zopfli({ threshold: true })

zopfliOptions Object

Options object to pass through to zopfli-node. See zopfli-node documentation for more information.

{
    verbose: false,
    verbose_more: false,
    numiterations: 15,
    blocksplitting: true,
    blocksplittinglast: false,
    blocksplittingmax: 15
};

Examples

var gulp = require("gulp");
var zopfli = require("gulp-zopfli");

gulp.task("compress", function() {
	gulp.src("./dev/scripts/*.js")
	.pipe(zopfli())
	.pipe(gulp.dest("./public/scripts"));
});

gulp.task("default", function() {
  gulp.run("compress");
});

Credit

This plugin is based on gulp-gzip.

Keywords

FAQs

Package last updated on 07 Dec 2018

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