0.1.2 • Published 12 months ago

@tinify_cli/cli v0.1.2

Weekly downloads
-
License
MIT
Repository
github
Last release
12 months ago

@tinify_cli/cli

A compress image resource cli tool througth by tinify.

Why

  • Convert other image type to webp
  • Compress any image files in your local
  • Watch mode, it can listen the assets dir, and auto execute convert or compress action

Install

$ npm install @tinify_cli/cli -g

Set up

First of all, it need get tinify token. Copy it to your env file(like ~/.zshrc in Mac OSX):

# ~/.zshrc
$ export TINIFY_TOKEN=xxxxxxx

Finally, execute the command:

$ source ~/.zshrc

Usage

Compress

$ tinify compress --name=[YOUR_IMAGE_PATH]

Generate to Webp

$ tinify generate --name=[YOUR_IMAGE_PATH]

Common options

--all

short: -a

Transform all files in the directory.

--watch

short: -w

Watch mode, the transform action wont\'t act immediately when the command is executed.

--name

short: -n

The name of the file to transform.

Note: With this option, the --all will be invalid.

--cwd

short: -c

The working directory of where @tinify_cli/cli command will be executed in, all other paths options are relative to this path.

--dir

short: -d

The directory to transform.

--output

short: -o

The directory to store the transformed files.

0.1.2

12 months ago

0.1.1

12 months ago

0.1.0

12 months ago