0.0.2 • Published 4 years ago

build-size-check v0.0.2

Weekly downloads
6
License
-
Repository
-
Last release
4 years ago

build-size-check

configuration file

define all file sizes here and the last time it was changed

supported naming

  • .buildsizes.js
  • buildsizes.config.js

flag for path

build-size-check --config folder/path

usage

module.exports = {
  lastUpdated: 'Fri May 29 2020 12:00:00 GMT-0500 (Central Daylight Time)', // optional timestamp
  files: [
    {
      path: '__mocks__/5kb.mock.js', // mandatory file path
      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
      externals: {
        // optional sizes are added and removed from maxSize for readabliity
        'package-one': '1kB'
      }
    }
  ]
};