node-pngquant
Advanced tools
+15
| ## 使用 nodejs 封装的基于 pngquant 的图片批量压缩工具 | ||
| **用户快速将指定目录下所有的 png 图片按照指定的配置输出到指定的位置** | ||
| ### 安装 | ||
| ```bash | ||
| npm install node-pngquant -g | ||
| ``` | ||
| ### 使用格式 | ||
| ```bash | ||
| node-pngquant [options] [dir] [output] [quality] | ||
| ``` |
+2
-2
@@ -76,5 +76,5 @@ #!/usr/bin/env node | ||
| exec( | ||
| `pngquant ${path.join(params.dir, fileName)} --quality=${ | ||
| `pngquant "${path.join(params.dir, fileName)}" --quality=50-${ | ||
| params.quality | ||
| } --output=${path.join(params.output, "compress", fileName)}`, | ||
| } --output="${path.join(params.output, "compress", fileName)}"`, | ||
| (err, _stdout, _stderr) => { | ||
@@ -81,0 +81,0 @@ if (err) { |
+2
-2
| { | ||
| "name": "node-pngquant", | ||
| "version": "1.0.0", | ||
| "version": "1.0.1", | ||
| "main": "index.js", | ||
@@ -13,3 +13,3 @@ "type": "module", | ||
| "keywords": [], | ||
| "author": "", | ||
| "author": "✨星凪✨", | ||
| "license": "ISC", | ||
@@ -16,0 +16,0 @@ "description": "", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
No contributors or author data
MaintenancePackage does not specify a list of contributors or an author in package.json.
Found 1 instance in 1 package
1
-50%1
-50%16
Infinity%4997
-58.94%3
-50%