项目作者: unrelentingtech

项目描述 :
Broccoli extension to apply brotli compression
高级语言: JavaScript
项目地址: git://github.com/unrelentingtech/broccoli-brotli.git
创建时间: 2017-01-26T21:19:52Z
项目社区:https://github.com/unrelentingtech/broccoli-brotli

开源协议:MIT License

下载


npm version
npm downloads
MIT License

Broccoli Brotli plugin

Fork of broccoli-zopfli (which is a fork of broccoli-gzip) to use Brotli instead of Zopfli instead of gzip to perform compression. All credit goes to the original authors of broccoli-{zopfli,gzip}.

Installation

  1. $ npm i broccoli-brotli

Example

  1. const Brotli = require('broccoli-brotli')
  2. const tree = new Brotli('app', {
  3. extensions: ['js', 'css', 'svg']
  4. })

Configuration

new Brotli(inputNode, options)


options.extensions {Array} (required)

The file extensions that should be compressed.


options.keepUncompressed {Boolean} (optional, default false)

Whether to keep uncompressed versions of the files in the resulting tree.


options.appendSuffix {Boolean} (optional, default true)

Whether to append the .br extension suffix to compressed files.


options.XXX

Where XXX comes from BrotliOptions.


License

broccoli-brotli is, like broccoli-zopfli, distributed under the MIT license.