New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

buildsize-cli

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

buildsize-cli

file size check for cli

latest
Source
npmnpm
Version
1.4.1
Version published
Maintainers
1
Created
Source

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

invalid example

references

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

FAQs

Package last updated on 19 Jun 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts