gz

gulp-zopfli

A gulp plugin for node-zopfli

Showing:

Popularity

Downloads/wk

38

GitHub Stars

11

Maintenance

Last Commit

6yrs ago

Contributors

3

Package

Dependencies

6

Size (min+gzip)

303.9KB

License

Type Definitions

Tree-Shakeable

No?

Categories

Readme

gulp-zopfli

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

NPM version Linux Build Status Coverage Status 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 node-zopfli. See node-zopfli 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.

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100
No reviews found
Be the first to rate

Alternatives

No alternatives found

Tutorials

No tutorials found
Add a tutorial