{"_id":"shrinkpng","_rev":"3186189","name":"shrinkpng","description":"Compress the image files obtained by the front end","dist-tags":{"latest":"1.2.0-beta.1"},"maintainers":[{"name":"ghkmmm","email":""}],"time":{"modified":"2024-01-04T03:17:32.000Z","created":"2022-07-02T06:25:28.770Z","1.2.0-beta.1":"2023-01-13T10:00:55.112Z","1.1.2":"2023-01-08T08:36:26.156Z","1.1.1":"2023-01-05T13:09:54.697Z","1.1.0":"2022-09-30T06:07:45.604Z","1.0.1":"2022-07-27T10:30:00.561Z","1.0.0":"2022-07-02T06:25:28.770Z"},"users":{},"author":"","repository":{"type":"git","url":"git+https://github.com/GHkmmm/shrinkpng.git"},"versions":{"1.2.0-beta.1":{"name":"shrinkpng","version":"1.2.0-beta.1","description":"Compress the image files obtained by the front end","main":"dist/index.js","types":"dist/index.d.ts","private":false,"scripts":{"dev":"vite","build":"rollup -c"},"keywords":[],"author":"","license":"ISC","dependencies":{"@babel/runtime-corejs3":"^7.18.3","pako":"^2.0.4","uzip":"^0.20201231.0"},"devDependencies":{"@babel/core":"^7.18.5","@babel/plugin-transform-runtime":"^7.18.5","@babel/preset-env":"^7.18.2","@rollup/plugin-babel":"^5.3.1","@rollup/plugin-commonjs":"^22.0.0","@rollup/plugin-typescript":"^8.3.3","rollup":"^2.74.0","rollup-plugin-dts":"^4.2.2","rollup-plugin-terser":"^7.0.2","tslib":"^2.4.0","typescript":"^4.7.3","vite":"^2.9.9"},"repository":{"type":"git","url":"git+https://github.com/GHkmmm/shrinkpng.git"},"homepage":"http://www.tracex.top/compress","gitHead":"4ecd22214ab4606cbc39af2ccbeeaf7fc9a13fff","bugs":{"url":"https://github.com/GHkmmm/shrinkpng/issues"},"_id":"shrinkpng@1.2.0-beta.1","_nodeVersion":"16.17.0","_npmVersion":"8.19.2","dist":{"shasum":"d696551c7e0eb29c9c0b08343be5a69de53583a8","size":33144,"noattachment":false,"key":"/shrinkpng/-/shrinkpng-1.2.0-beta.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/shrinkpng/download/shrinkpng-1.2.0-beta.1.tgz"},"_npmUser":{"name":"ghkmmm","email":"hgmkk2299@icloud.com"},"directories":{},"maintainers":[{"name":"ghkmmm","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/shrinkpng_1.2.0-beta.1_1673604054973_0.751777517675102"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-01-13T10:00:55.112Z","publish_time":1673604055112,"_cnpm_publish_time":1673604055112},"1.1.2":{"name":"shrinkpng","version":"1.1.2","description":"Compress the image files obtained by the front end","main":"dist/index.js","types":"dist/index.d.ts","private":false,"scripts":{"dev":"vite","build":"rollup -c"},"keywords":[],"author":"","license":"ISC","dependencies":{"@babel/runtime-corejs3":"^7.18.3","pako":"^2.0.4","uzip":"^0.20201231.0"},"devDependencies":{"@babel/core":"^7.18.5","@babel/plugin-transform-runtime":"^7.18.5","@babel/preset-env":"^7.18.2","@rollup/plugin-babel":"^5.3.1","@rollup/plugin-commonjs":"^22.0.0","@rollup/plugin-typescript":"^8.3.3","rollup":"^2.74.0","rollup-plugin-dts":"^4.2.2","rollup-plugin-terser":"^7.0.2","tslib":"^2.4.0","typescript":"^4.7.3","vite":"^2.9.9"},"repository":{"type":"git","url":"git+https://github.com/GHkmmm/shrinkpng.git"},"homepage":"http://compress.tracex.top","gitHead":"8b5f7b41934a3d3d75c780b73048296c9f1a315e","bugs":{"url":"https://github.com/GHkmmm/shrinkpng/issues"},"_id":"shrinkpng@1.1.2","_nodeVersion":"14.21.1","_npmVersion":"6.14.17","dist":{"shasum":"fd7219e7dbf397e1e66532e8a208d0737e474f2f","size":32778,"noattachment":false,"key":"/shrinkpng/-/shrinkpng-1.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/shrinkpng/download/shrinkpng-1.1.2.tgz"},"_npmUser":{"name":"ghkmmm","email":"hgmkk2299@icloud.com"},"directories":{},"maintainers":[{"name":"ghkmmm","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/shrinkpng_1.1.2_1673166985955_0.1581494589265322"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-01-08T08:36:29.594Z","publish_time":1673166986156,"_cnpm_publish_time":1673166986156},"1.1.1":{"name":"shrinkpng","version":"1.1.1","description":"Compress the image files obtained by the front end","main":"dist/index.js","types":"dist/index.d.ts","private":false,"scripts":{"dev":"vite","build":"rollup -c"},"keywords":[],"author":"","license":"ISC","dependencies":{"@babel/runtime-corejs3":"^7.18.3","pako":"^2.0.4","uzip":"^0.20201231.0"},"devDependencies":{"@babel/core":"^7.18.5","@babel/plugin-transform-runtime":"^7.18.5","@babel/preset-env":"^7.18.2","@rollup/plugin-babel":"^5.3.1","@rollup/plugin-commonjs":"^22.0.0","@rollup/plugin-typescript":"^8.3.3","rollup":"^2.74.0","rollup-plugin-dts":"^4.2.2","rollup-plugin-terser":"^7.0.2","tslib":"^2.4.0","typescript":"^4.7.3","vite":"^2.9.9"},"repository":{"type":"git","url":"git+https://github.com/GHkmmm/shrinkpng.git"},"homepage":"http://www.tracex.top/compress","gitHead":"db136b1d983560b328b6ad8c3bc5624ca059fd52","bugs":{"url":"https://github.com/GHkmmm/shrinkpng/issues"},"_id":"shrinkpng@1.1.1","_nodeVersion":"14.21.1","_npmVersion":"6.14.17","dist":{"shasum":"486c474aec7356a8b53baeb2e571a2c7f75e24aa","size":32770,"noattachment":false,"key":"/shrinkpng/-/shrinkpng-1.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/shrinkpng/download/shrinkpng-1.1.1.tgz"},"_npmUser":{"name":"ghkmmm","email":"hgmkk2299@icloud.com"},"directories":{},"maintainers":[{"name":"ghkmmm","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/shrinkpng_1.1.1_1672924194560_0.38024172625165464"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-01-05T13:13:20.001Z","publish_time":1672924194697,"_cnpm_publish_time":1672924194697},"1.1.0":{"name":"shrinkpng","version":"1.1.0","description":"Compress the image files obtained by the front end","main":"dist/index.js","types":"dist/index.d.ts","private":false,"scripts":{"dev":"vite","test":"echo \"Error: no test specified\" && exit 1","build":"rollup -c"},"keywords":[],"author":"","license":"ISC","dependencies":{"@babel/runtime-corejs3":"^7.18.3","pako":"^2.0.4","uzip":"^0.20201231.0"},"devDependencies":{"@babel/core":"^7.18.5","@babel/plugin-transform-runtime":"^7.18.5","@babel/preset-env":"^7.18.2","@rollup/plugin-babel":"^5.3.1","@rollup/plugin-commonjs":"^22.0.0","@rollup/plugin-typescript":"^8.3.3","rollup":"^2.74.0","rollup-plugin-dts":"^4.2.2","rollup-plugin-terser":"^7.0.2","tslib":"^2.4.0","typescript":"^4.7.3","vite":"^2.9.9"},"repository":{"type":"git","url":"git+https://github.com/GHkmmm/shrinkpng.git"},"homepage":"http://www.tracex.top/compress","gitHead":"a462d641a17aab588d7c863d4343fc0c959f4733","bugs":{"url":"https://github.com/GHkmmm/shrinkpng/issues"},"_id":"shrinkpng@1.1.0","_nodeVersion":"16.17.0","_npmVersion":"6.14.6","dist":{"shasum":"469f05625226f5ba088fa3ad7817dee02e13f99f","size":32816,"noattachment":false,"key":"/shrinkpng/-/shrinkpng-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/shrinkpng/download/shrinkpng-1.1.0.tgz"},"_npmUser":{"name":"ghkmmm","email":"hgmkk2299@icloud.com"},"directories":{},"maintainers":[{"name":"ghkmmm","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/shrinkpng_1.1.0_1664518065421_0.4610436823434836"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-09-30T06:11:09.888Z","publish_time":1664518065604,"_cnpm_publish_time":1664518065604},"1.0.1":{"name":"shrinkpng","version":"1.0.1","description":"Compress the image files obtained by the front end","main":"dist/index.js","types":"dist/index.d.ts","private":false,"scripts":{"dev":"vite","test":"echo \"Error: no test specified\" && exit 1","build":"rollup -c"},"keywords":[],"author":"","license":"ISC","dependencies":{"@babel/runtime-corejs3":"^7.18.3","pako":"^2.0.4","uzip":"^0.20201231.0"},"devDependencies":{"@babel/core":"^7.18.5","@babel/plugin-transform-runtime":"^7.18.5","@babel/preset-env":"^7.18.2","@rollup/plugin-babel":"^5.3.1","@rollup/plugin-commonjs":"^22.0.0","@rollup/plugin-typescript":"^8.3.3","rollup":"^2.74.0","rollup-plugin-dts":"^4.2.2","rollup-plugin-terser":"^7.0.2","tslib":"^2.4.0","typescript":"^4.7.3","vite":"^2.9.9"},"repository":{"type":"git","url":"git+https://github.com/GHkmmm/shrinkpng.git"},"homepage":"http://www.tracex.top/compress","gitHead":"89214d947789f92eeecf425568db5d23fa88ee3c","bugs":{"url":"https://github.com/GHkmmm/shrinkpng/issues"},"_id":"shrinkpng@1.0.1","_nodeVersion":"14.18.3","_npmVersion":"6.14.15","dist":{"shasum":"65d2d45ef754eb208f47caf480e1706528eb4d7b","size":33036,"noattachment":false,"key":"/shrinkpng/-/shrinkpng-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/shrinkpng/download/shrinkpng-1.0.1.tgz"},"_npmUser":{"name":"ghkmmm","email":"hgmkk2299@icloud.com"},"directories":{},"maintainers":[{"name":"ghkmmm","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/shrinkpng_1.0.1_1658917800367_0.3952942412157894"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-07-27T11:05:20.016Z","publish_time":1658917800561,"_cnpm_publish_time":1658917800561},"1.0.0":{"name":"shrinkpng","version":"1.0.0","description":"Compress the image files obtained by the front end","main":"dist/index.js","types":"dist/index.d.ts","private":false,"scripts":{"dev":"vite","test":"echo \"Error: no test specified\" && exit 1","build":"rollup -c"},"keywords":[],"author":"","license":"ISC","dependencies":{"@babel/runtime-corejs3":"^7.18.3","pako":"^2.0.4","uzip":"^0.20201231.0"},"devDependencies":{"@babel/core":"^7.18.5","@babel/plugin-transform-runtime":"^7.18.5","@babel/preset-env":"^7.18.2","@rollup/plugin-babel":"^5.3.1","@rollup/plugin-commonjs":"^22.0.0","@rollup/plugin-typescript":"^8.3.3","rollup":"^2.74.0","rollup-plugin-dts":"^4.2.2","rollup-plugin-terser":"^7.0.2","tslib":"^2.4.0","typescript":"^4.7.3","vite":"^2.9.9"},"repository":{"type":"git","url":"git+https://github.com/GHkmmm/shrinkpng.git"},"homepage":"http://www.tracex.top/compress","gitHead":"e52bea3c4fff025defb7f2e0555e633420420ffb","bugs":{"url":"https://github.com/GHkmmm/shrinkpng/issues"},"_id":"shrinkpng@1.0.0","_nodeVersion":"16.15.1","_npmVersion":"8.12.2","dist":{"shasum":"3887a6f5d0a4a689c7b3caade87897481617a031","size":32997,"noattachment":false,"key":"/shrinkpng/-/shrinkpng-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/shrinkpng/download/shrinkpng-1.0.0.tgz"},"_npmUser":{"name":"ghkmmm","email":"hgmkk2299@icloud.com"},"directories":{},"maintainers":[{"name":"ghkmmm","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/shrinkpng_1.0.0_1656743128538_0.8651266767203609"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-07-02T06:44:35.586Z","publish_time":1656743128770,"_cnpm_publish_time":1656743128770}},"readme":"<!--\n * @Author: Tracer\n * @Date: 2022-06-26 21:50:31\n * @LastEditors: Tracer\n * @LastEditTime: 2022-07-02 14:23:07\n * @FilePath: /shrinkjs/README.md\n-->\n<h1 align=\"center\">shrinkpng</h1>\n\n<p align=\"center\" style=\"color:#0066cc;font-size:18px\">Compress the image files obtained by the front end</p>\n\n<p align=\"center\">\n  ???? <a href=\"http://www.tracex.top/compress\" target=\"_blank\">Official website</a>&nbsp;&nbsp;\n  ???? <a href=\"https://github.com/GHkmmm/shrinkpng\" target=\"_blank\">Github</a>&nbsp;&nbsp;\n  ???? <a href=\"https://www.npmjs.com/package/shrinkpng\" target=\"_blank\">Npm</a>\n</p>\n\n使用[UPNG.js](https://github.com/photopea/UPNG.js)对 PNG 文件进行有损缩小，类似于[TinyPNG](https://tinypng.com/)和其他工具。\n\n## 安装\n\n打开终端运行下列命令：\n\n```\nnpm install shrinkpng\n```\n\n或\n\n```\nyarn add shrinkpng\n```\n\n## 开始使用\n\n请先[下载]()本插件\n\n然后在你的代码中引入 shrinkpng\n\n```js\nimport { shrinkImage } from \"shrinkpng\";\n\n...\nconst _file = await shrinkImage(file, {\n  quality: 80\n});\n```\n\n#### Vue 文件示例\n\n代码示例\n\n```vue\n<template>\n\t<div id=\"app\">\n\t\t<input\n\t\t\ttype=\"file\"\n\t\t\tclass=\"file\"\n\t\t\tid=\"imgUpFile\"\n\t\t\tstyle=\"position: absolute; left: 0; top: 0; width: 100%; height: 100%\"\n\t\t/>\n\t</div>\n</template>\n\n<script>\nimport { shrinkImage } from \"shrinkpng\";\n\nexport default {\n  name: \"App\",\n  mounted() {\n    document.getElementById(\"imgUpFile\").addEventListener(\"change\", (e) => {\n      const file = e.target.files[0];\n      const _file = await shrinkImage(file, {\n        quality: 80\n      }); // compress file\n    });\n  },\n};\n</script>\n```\n","_attachments":{},"homepage":"http://www.tracex.top/compress","bugs":{"url":"https://github.com/GHkmmm/shrinkpng/issues"},"license":"ISC"}