Skip to content

Repository files navigation

tiny 命令行压缩

github地址 : https://github.com/frxing/tiny

gitee地址 : https://gitee.com/btoa/tiny

使用方法

安装

 npm install -g @frxing/tiny

此时全局就多了3个命令:tiny 、ty 、ti。三个命令相同,ti/ty只是简写形式

使用

  1. 注册tinypng的apikey。

  2. 添加apikey

 ty addKey ***************
  1. 进入图片目录,右键从终端打开(macOs: 右键-服务-新建位于文件夹位置的终端标签页)。
 # 压缩整个文件夹里面的图片
 ty 

 # 压缩某一张图片
 ty ./*.png

 # 压缩某个目录
 ty */*
  1. 压缩完成后会在文件的同级多了一个dest目录存放压缩后的图片

About

命令行图片压缩

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages