Skip to content

A png image compression terminal tool, including ‘mv operation’

Notifications You must be signed in to change notification settings

jinxxxxxi/compress-pngs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

说明

命令行工具,用于将指定目录Dir1下的 png 图片 压缩到指定目录Dir2

下载

npm install compress-pngs -g

配置 tiny-png key

点击官网 https://tinypng.com/

第一步 注册

Image text

第二步 申请 key

Image text

第三步 将 key 添加到项目 config.json 文件下

"tinyKey" : your key here

命令行使用

  1. compress-png --src[源地址] --target[目标地址] (都必须是绝对地址
  2. 增加 --local 参数,表示从当前目录下获取[源地址],会优先获取[src]参数; [local]和[src]必须得有一个
  3. target 参数可选,若不传则会在当前文件下面创建一个[timestamp]_png 目录

注意

About

A png image compression terminal tool, including ‘mv operation’

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published