Skip to content

yrootio/filesizr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Filesizr

Filesizr is a file size validator

Installation

By using yarn (the recommended way):

yarn add -D filesizr

Or by using npm:

npm install --save-dev filesizr

Configuration

Add your configuration to your package.json file. Example:

  "filesizr": [
    {
      "path": "index.js",
      "maxSize": "100 B",
      "compressed": false
    },
    {
      "path": "src/*.js",
      "maxSize": "3 kB"
    },
    {
      "path": "index.js",
      "maxSize": "100 B",
      "compressed": true
    }
  ]

Usage

Add filesizr in your scripts

"scripts": {
  "test": "filesizr"
}

CLI

$ filesizr -f ./dist/inde*.js -s 100b

Informations

Similar projects

License

MIT