chonkr

1.0.7 • Public • Published

Chonky logo

CHONK

Use

npm install chonkr -g

// from any directory
chonk

//or! use direct without install
npx chonkr

chonk will recursively loop through current and subdirectories to find any jpgs or pngs. It will find any above a given threshold (100kb at the moment, but configurable option coming soon) and list the files found. You can then optionally compress the files.

Example usage

Why

Inspired by #LetsGreenTheWeb, I wanted to make a simple CLI tool to help devs check their projects for any cheeky/chonky large images that may have crept in (we've all done it).

Hopefully running chonk before you ship will catch (and compress) any large images and contribute to reducing overheads & energy consumption (as well as making your project faster to load, right?).

This is a personal/side project and should probably not be used in production (there are many many grunt/build tools that do this same thing far better than I)

Notes

  • only for .jpg & /png
  • chonk overwrites images!
  • we copy the compressed images into a temporary folder - tested on *nix systems, not on Windows.
  • 100kb is default threshold at the minute
  • compression ratios are fixed!
  • you can optionally pass a directory e.g. `chonk '../../lolcats/'
  • very much

/chonkr/

    Package Sidebar

    Install

    npm i chonkr

    Weekly Downloads

    3

    Version

    1.0.7

    License

    ISC

    Unpacked Size

    224 kB

    Total Files

    10

    Last publish

    Collaborators

    • chrisquinnr