Latest Threat ResearchGlassWorm Loader Hits Open VSX via Developer Account Compromise.Details
Socket
Book a DemoInstallSign in
Socket

fly-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

fly-gzip

Gzip plugin for Fly.

latest
Source
npmnpm
Version
2.1.0
Version published
Maintainers
1
Created
Source

fly-gzip npm package

Gzip plugin for Fly.

Install

npm install --save-dev fly-gzip

Usage

exports.gzip = function * () {
  yield this.source('dist/**/*.*')
    .gzip({
      threshold: 1024,
      ext: 'gzip',
      options: {
        level: 9
      }
    })
    .target('dist');
}

API

.gzip(options)

Any files passed through .gzip() will not be affected directly. Instead, a cloned copy will be compressed & have its extension modified. This means your target directory will contain the orginal file and its gzipped copy.

\src
  |- bundle.js
\dist
  |- bundle.js
  |- bundle.js.gz

ext

Type: string
Default: gz

The extension to append to the compressed file's type.

bundle.js ===> bundle.js.gz

threshold

Type: integer
Default: false

The minimum size, in bytes, required to be compressed. If a file does not satisfy this requirement, it will not be gzipped.

options

Type: object
Default: {}

The zlib options to pass in.

License

MIT © Luke Edwards

Keywords

fly

FAQs

Package last updated on 01 Feb 2017

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