Git Product home page Git Product logo

beez-optim's Introduction

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

beez-optim's People

Contributors

fkei avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.