tiny-compress
v1.0.0
Published
tiny png compress picture
Downloads
2
Readme
tiny-compress
use tinypng.com to compress picture
Usage
$ npm install tiny-compress
const Tiny = require('tiny-compress')
let tiny = new Tiny({
key:'',//tinycss personal key,I have wrote a defalut key in this program
inDir:'',//the pic dir needs ro be compress
outDir:''//the pic output dir
}).compress()
APIs
setConfig(opts)
use setConfig()
can reset configs, opts
:
- key:'',//tinycss personal key,I have wrote a defalut key in this program
- inDir:'',//the pic dir needs ro be compress
- outDir:''//the pic output dir
compress()
use compress()
to start compress, the compress()
will return an Array such as:
// compress return
[[picture in path, picture out path],[picture1 in path, picture1 out path]]