zippng

1.0.2 • Public • Published

zippng

中文
A simple Node.js script for compressing PNG format images using the TinyPNG API.

Installation

  1. Clone the repository:

    git clone https://github.com/lidppp/zippng-node.git
    cd zippng
    yarn install
  2. Install dependencies:

    npm install -g zippng

Usage

zippng [-r|-v|-h|-s key]
  • -r: Recursively search for PNG files.
  • -v: View version.
  • -h: Help documentation.
  • -s key: Set TinyPNG API Key.

Configuration

The script requires a TinyPNG API key. You can refer to the TinyPNG documentation for the application process.
Configure using zippng -s YOUR_API_KEY

Example

# Compress PNG files in the current directory
zippng

# Recursively compress PNG files
zippng -r

# Set TinyPNG API Key
zippng -s YOUR_API_KEY

Version

Check the version of the script:

zippng -v

Help

View help documentation:

zippng -h

Notes

  • If an API key is not provided or an incorrect API key is provided, the script will not run as expected.
  • For more details on TinyPNG API, refer to TinyPNG Developers.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Package Sidebar

Install

npm i zippng

Weekly Downloads

1

Version

1.0.2

License

MIT

Unpacked Size

7.9 kB

Total Files

6

Last publish

Collaborators

  • lidppp