@cyber-tools/tinify

基于tinipng的openAPI开发的图片批处理压缩脚本

Usage no npm install needed!

<script type="module">
  import cyberToolsTinify from 'https://cdn.skypack.dev/@cyber-tools/tinify';
</script>

README

@cyber-tools/tinify

Table Of Contents

  1. Install
  2. Introduction
  3. Configuration
  4. Commands

Install

全局安装:

npm install @cyber-tools/tinify -g

作为开发依赖安装:

npm instal @cyber-tools/tinify --save-dev

Introduction

基于tinipng的openAPI 该工具用于批量压缩项目中的图片文件,为了防止重复压缩,会根据文件内容的MD5值生成tinify.lock.json记录文件

Commands

创建配置文件:

cyber-tinify init

登录到tinipng:

cyber-tinify login

登出tinipng:

cyber-tinify logout

查看登录信息:

cyber-tinify view

批量压缩:

cyber-tinify start