1.4.0 • Published 4 months ago

buildsize-cli v1.4.0

Weekly downloads
2,258
License
MIT
Repository
github
Last release
4 months ago

buildsize-cli 🏗️

define file sizes, error message and the last time it was changed

supported naming

  • .buildsizerc.js
  • buildsize.config.js

flag for path

buildsize-cli --config folder/path

usage

module.exports = {
  lastUpdated: 'Fri May 29 2020 12:00:00 GMT-0500 (Central Daylight Time)', // optional timestamp
  failMessage: 'Please fix, split, or set to warn.', // optional message to display on failed check
  failOnMissingBundles: true, // optional boolean to decalre if job should fail if any files are missing
  files: [
    {
      path: '__mocks__/5kb.mock.js', // build file path to check against
      maxSize: '6kB', // optional max file size validation
      minSize: '1kB', // optional min file size validation
      compression: 'gzip', // optional compression type, gzip | brotli
      warnOnly: true, // optional choice to not fail the check
      lastSize: true, // optionally display percentage difference of current size and last set max size
      externals: {
        // optional sizes are added and removed from maxSize for readabliity
        'package-one': '1kB'
      }
    }
  ]
};

valid example

npm.io

invalid example

npm.io

references

this all started on the basis of the amazing bundlesize project but is centered around unique customizations

1.4.0

4 months ago

1.3.0

10 months ago

1.2.0

1 year ago

1.2.1

1 year ago

1.1.1

3 years ago

1.1.0

3 years ago

1.1.2

3 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago