simple-file-size
a super simple cli for file-size limit
Last updated 5 months ago by huangteng .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install simple-file-size 
SYNC missed versions from official npm registry.

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

Current Tags

  • 1.0.6                                ...           latest (5 months ago)

5 Versions

  • 1.0.6                                ...           5 months ago
  • 1.0.5                                ...           5 months ago
  • 1.0.4                                ...           5 months ago
  • 1.0.1                                ...           5 months ago
  • 1.0.0                                ...           5 months ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (8)
Dev Dependencies (14)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |