1.0.4 • Published 3 years ago

husky-imagemin v1.0.4

Weekly downloads
7
License
MIT
Repository
github
Last release
3 years ago

husky-imagemin

automatically optimize newly added image before commit

NPM JavaScript Style Guide Downloads/week

Install

npm install husky-imagemin --save-dev
or
yarn add husky-imagemin -D

How to use

Basic usage

add command to husky hooks config, if already use lint-stage, you can use && to concat husky-imagemin

"husky": {
    "hooks": {
        "pre-commit": "lint-staged && husky-imagemin"
    }
}

Custom usage

you can specific large image definination by pass parameter to husky-imagemin, default large image definination is > 50kb

"husky": {
    "hooks": {
        "pre-commit": "lint-staged && husky-imagemin --size=100"
    }
}
1.0.5-alpha.0

3 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago