simple-file-size
v1.0.6
Published
a super simple cli for file-size limit
Downloads
13
Maintainers
Readme
simple-file-size
a super simple cli for file-size limit
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
Commands
It works well now, maybe we need more in future, not now