gobble-gzip

0.1.0 • Public • Published

gobble-gzip

Compress files with GZIP.

Installation

Make sure to have gobble installed. Then,

npm i -D gobble-gzip

Usage

gobblefile.js

var gobble = require('gobble');
 
var js = gobble( 'js' );
 
module.exports = gobble([
  js,
  js.transform( 'gzip' )
]);

This will make gobble serve all files in the js/ directory, along with gzip-compressed versions of the .js files with a .js.gz extension.

To process file types other than JavaScript, such as Markdown, supply the accept and ext options like so.

markdown.transform( 'gzip', {
  accept: [ '.md', '.markdown' ],
  ext: '.md.gz'
})

You can pass additional options to zlib using the zlib option.

License

MIT. Copyright 2015 Oskar Segersvärd

Package Sidebar

Install

npm i gobble-gzip

Weekly Downloads

1

Version

0.1.0

License

MIT

Last publish

Collaborators

  • victorystick