0.1.0 • Published 9 years ago

gobble-gzip v0.1.0

Weekly downloads
2
License
MIT
Repository
github
Last release
9 years ago

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