Nana Plays Minesweeper

    bundle-size

    1.1.5 • Public • Published

    Build Status Coverage Status Code Climate

    bundle-size

    Show bundle file size of npm packages

    Installation

    $ npm install bundle-size

    Usage

    in CLI

    $ bundle-size --help
    Show bundle file size of npm packages
     
    Usage
      bundle-size [packages] [options]
     
    Options
      -e, --env         set NODE_ENV
      -h, --help        show help
      -r, --reporter    output style (json)
      -v, --version     print version

    Example:

    bundle-size react
    bundle-size react --env development
    bundle-size react -e development -e production

    in Node.js module

    const bundleSize = require('bundle-size');
     
    bundleSize(['react', 'redux'], { env: ['development', 'production'] }).then((results) => {
      console.log(results);
    });
     
    // react@15.2.1, redux@3.5.2
    //
    // env          bundle     minify    gzip
    // --           155.65 kB  78.43 kB  24.78 kB
    // development  150.89 kB  71.58 kB  23.54 kB
    // production   150.81 kB  57.87 kB  18.28 kB

    License

    MIT © mkwtys

    Install

    npm i bundle-size

    DownloadsWeekly Downloads

    368

    Version

    1.1.5

    License

    MIT

    Last publish

    Collaborators

    • mkwtys