You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

metalsmith-gzip

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

metalsmith-gzip

A Metalsmith plugin to compress build files with gzip.

0.1.0
Source
npmnpm
Version published
Weekly downloads
58
-54.69%
Maintainers
1
Weekly downloads
 
Created
Source

metalsmith-gzip Build Status

A Metalsmith plugin that lets you create gzipped versions of your build files. This is useful if you are hosting your website on Amazon S3, where it is not possible to set up compression on the server.

Installation

$ npm install metalsmith-gzip

Usage

var Metalsmith = require('metalsmith');
var compress = require('metalsmith-gzip');

var metalsmith = new Metalsmith(__dirname)
  .use(compress());

metalsmith-gzip will produce a gzipped version of all files in your build whose extension matches the following regular expression

/\.[html|css|js|json|xml|svg|txt]/

The choice of files to compress is loosely based on the HTML5 Boilerplate server configuration.

You will then need to set up a script yourself to upload the gzipped versions of the files to your preferred hosting provider. Take care that the files are served with the correct Content-Encoding.

At the moment, metalsmith-gzip does not take any configuration options.

Acknowledgements

The functionality was inspired by the Middleman gzip extension.

Keywords

metalsmith

FAQs

Package last updated on 03 Sep 2014

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