optimo 0.0.16 → 0.0.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -12,8 +12,8 @@
12
12
  ## Highlights
13
13
 
14
14
  - Format-specific tuning for stronger size reduction.
15
- - Backed by proven tools: ImageMagick, SVGO, Gifsicle, and MozJPEG.
16
15
  - Safety guard: if optimized output is not smaller, original file is kept.
16
+ - Backed by proven tools: ImageMagick, SVGO, Gifsicle, and MozJPEG.
17
17
  - Resizing supports percentage values (`50%`), max file size targets (`100kB`), width (`w960`), & height (`h480`).
18
18
 
19
19
  ## Usage
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "optimo",
3
3
  "description": "The no-brainer ImageMagick CLI for optimizing images",
4
4
  "homepage": "https://github.com/kikobeats/optimo",
5
- "version": "0.0.16",
5
+ "version": "0.0.17",
6
6
  "exports": {
7
7
  ".": "./src/index.js"
8
8
  },
@@ -2,10 +2,10 @@
2
2
 
3
3
  const path = require('node:path')
4
4
 
5
+ const mozjpegtran = require('./mozjpegtran')
6
+ const gifsicle = require('./gifsicle')
5
7
  const magick = require('./magick')
6
8
  const svgo = require('./svgo')
7
- const gifsicle = require('./gifsicle')
8
- const mozjpegtran = require('./mozjpegtran')
9
9
 
10
10
  const PIPELINES = {
11
11
  '.png': [magick.png],
@@ -40,9 +40,7 @@ const getRequiredBinaries = (pipeline, opts = {}) => {
40
40
  })
41
41
  }
42
42
 
43
- return Array.from(
44
- new Map(binaries.map(binary => [binary.name, binary])).values()
45
- )
43
+ return Array.from(new Map(binaries.map(binary => [binary.name, binary])).values())
46
44
  }
47
45
 
48
46
  module.exports = { getPipeline, getRequiredBinaries }