Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
beez-optim makes specify images optimize automatically in build process.
JavaScript CSS
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
bin
lib
tests
.gitignore
LICENSE
README.md
package.json
setver

README.md

beez-optim

About

特定のディレクトリを指定して、optipng jpegoptim pngquant を実行し画像を圧縮するコマンドです。

拡張子 .png .jpg .jpeg で画像判定します。

deps

Install

$ npm install -g beez-optim

Test

$ npm test

Configuration file

-c --config json data

{
    "optipng": {
        "use": true,
        "level": 3
    },
    "jpegoptim": {
        "use": true,
        "options": "--strip-all"
    },
    pngquant: {
        use: false,
        options: "--ext .png -f -v"
    }
}

Command line help

$ beez-optim -h

  Usage: beez-optim [options]

  Options:

    -h, --help                output usage information
    -p --limit <limit>        process limit default=10
    -s --srcdir <srcdir>      Source directory root path.
    -c --config <config>      configuration file.
    example config data:
        {
          "optipng": {
            "use": true,
            "level": 2
          },
          "jpegoptim": {
            "use": true,
            "options": '--strip-all'
          },
          "pngquant": {
            "use": false,
            "options": "--ext .png -f -v"
          }
        }

    -l --loglevel <loglevel>  Log level. default) INFO
       DEBUG: 1
       INFO:  2
       WARN:  3
       ERROR: 4
       FATAL: 5

Example

default

$ beez-optim -s /tmp/image

option

$ beez-optim -s /tmp/image -c ./config.json -l 1

LICENSE

The MIT License (MIT)

@see : LICENSE

Something went wrong with that request. Please try again.