Learn about our RFC process, Open RFC meetings & more.Join in the discussion! »

simple-file-size

1.0.6 • Public • Published

simple-file-size

a super simple cli for file-size limit

oclif Version Downloads/week Build Status License

Usage

$ npm install --save-dev simple-file-size

Super simple, Just two steps

  • add filesize in package.json
{
  "name": "simple-file-size",
  "description": "a super simple cli for file-size limit",
  "version": "1.0.0",
  "filesize": [
    {
      "maxSize": "1kb",
      "path": "./test/index.test.ts", 
      "level": 9
    }
  ]
}
  • maxSize must be a string like '1kb', '1mb', '10244'
  • path, as you know, like './index.ts', path.resolve(__dirname, './a.js')
  • level is optional, default is 9
  • add script in package.json
{
  "scripts": {
    "filesize": "npx simple-file-size"
  }
}

or download the simple-file-size in devDepencies, and then:

"scripts"{
    "filesize": "filesize"
  }
  • demos

demo

Commands

It works well now, maybe we need more in future, not now

Install

npm i simple-file-size

DownloadsWeekly Downloads

1

Version

1.0.6

License

MIT

Unpacked Size

6.23 kB

Total Files

6

Last publish

Collaborators

  • avatar