# shimr

> SHarp IMages Recursively

Latest version **1.1.1** (published 2020-01-07) · ISC license · 0 weekly downloads

## Install

```sh
npm install shimr
pnpm add shimr
yarn add shimr
bun add shimr
```

Provides the command `shimr`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.1 |
| Published | 2020-01-07 |
| First published | 2020-01-07 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 7.1 KB |
| Known vulnerabilities | 0 (+4 in 1 direct dependencies) |
| Install scripts | no |
| Author | tmantas |
| Maintainers | tmantas |
| Keywords | shimr, images, img, png, jpg, jpeg, webp, compressor, sharp |

## Links

- npm: https://www.npmjs.com/package/shimr
- Repository: https://gitlab.com/tmantas/shimr
- Homepage: https://gitlab.com/tmantas/shimr#readme
- Issues: https://gitlab.com/tmantas/shimr/issues
- npm.io page: https://npm.io/package/shimr

## Dependencies (2)

- [chalk](https://npm.io/package/chalk.md) ^3.0.0
- [sharp](https://npm.io/package/sharp.md) ^0.23.4

## Alternatives

- [exif-parser](https://npm.io/package/exif-parser.md) — 3.8M weekly downloads
- [vite-plugin-compression](https://npm.io/package/vite-plugin-compression.md) — 569.5K weekly downloads
- [pica](https://npm.io/package/pica.md) — 442.4K weekly downloads
- [@reportportal/client-javascript](https://npm.io/package/@reportportal/client-javascript.md) — 408.8K weekly downloads
- [@tldraw/state](https://npm.io/package/@tldraw/state.md) — 316.0K weekly downloads

## Recent versions

- 1.1.1 (latest) — 2020-01-07
- 1.1.0 — 2020-01-07
- 1.0.1 — 2020-01-07
- 1.0.0 — 2020-01-07

## README

# shimr - SHarp IMages Recursively

Compresses images and converts them to Webp format. Scans directory recursively and reflects the structure in destination directory.

Uses [sharp](https://github.com/lovell/sharp).

## Installation

Locally:
```
npm i shimr
```

Globally:
```
npm i -g shimr
```

## Usage

```
shimr -s sourcePath -d distinationPath
```

## Options

| Option    | Description                    | Default value |
|-----------|--------------------------------|---------------|
| `-s`      | Source directory               | `./src`       |
| `-d`      | Destination directory          | `./dist`      |
| `-nowebp` | Skip converting to Webp format | `false`       |


## Example

Example structure:

```
└── src
    ├── img
    │   ├── big.jpg
    │   ├── more-sizes
    │   │   └── sample@2x.png
    │   └── subfolder
    │       └── deeper-level
    │           └── sample.jpg
    └── this-is-not-an-image.txt
```

Run `shimr`. Shimr will generate new folder called `dist` reflecting the source folder's structure`:

```
└──  dist
    └── img
        ├── big.jpg
        ├── big.webp
        ├── more-sizes
        │   ├── sample.png
        │   ├── sample.webp
        │   ├── sample@2x.png
        │   └── sample@2x.webp
        └── subfolder
            └── deeper-level
                ├── sample.jpg
                └── sample.webp

```

---
_Source: https://npm.io/package/shimr · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
