0.1.4 • Published 5 years ago
limit-size v0.1.4
limit-size
Lightweight,Convenient,Fastcommand tool to control your file size,size-limitis too bloated.
Install
$ npm i --save-dev limit-sizeUsage
- Add the
limit-sizesection and thesizescript to yourpackage.json:
"scripts": {
+ "size": "limit-size",
"test": "jest"
},
+ "limit-size": [
+ {
+ "path": "dist/g2plot.min.js",
+ "limit": "500 Kb"
+ },
+ {
+ "path": "dist/g2plot.min.js",
+ "limit": "200 Kb",
+ "gzip": true
+ }
+ ],- you can get the size for your current project:
$ npm run sizeDev
# install dependence
$ npm install
# run test cases
$ npm run test
# build package
$ npm run build
# run size local
$ npm run sizeLicense
MIT@hustcc.