broccoli-brotli

    2.0.0 • Public • Published

    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

    $ npm i broccoli-brotli

    Example

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

    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.mode {Number} (optional, default 0)

    Brotli mode


    options.quality {Number} (optional, default 11)

    Compression strength


    options.lgwin {Number} (optional, default 22)

    No idea lol


    options.lgblock {Number} (optional, default 0)

    No idea lol

    License

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

    Install

    npm i broccoli-brotli

    DownloadsWeekly Downloads

    6,563

    Version

    2.0.0

    License

    MIT

    Unpacked Size

    8.89 kB

    Total Files

    7

    Last publish

    Collaborators

    • floatboth