@newsteam/imagemin

0.0.33 • Public • Published

@newsteam/imagemin

License npm package npm downloads Dependencies DevDependencies

This package provides a shared config for imagemin and several of its plugins.

Install

$ npm install imagemin

Usage

import imagemin from "@newsteam/imagemin";

(async () => {

  const files = await imagemin(['images/*.{jpg,png}'], 'build/images');

  console.log(files);
  //=> [{data: <Buffer 89 50 4e ...>, path: 'build/images/foo.jpg'}, ...]

})();

API

imagemin(input, [output], [options])

Returns Promise<Object[]> in the format {data: Buffer, path: string}.

input

Type: string[]

Files to be optimized. See supported minimatch patterns.

output

Type: string

Maintenance

You can run tests with npm test.

/@newsteam/imagemin/

    Package Sidebar

    Install

    npm i @newsteam/imagemin

    Weekly Downloads

    0

    Version

    0.0.33

    License

    MIT

    Unpacked Size

    6.94 kB

    Total Files

    11

    Last publish

    Collaborators

    • richard.hazelden
    • jasonsouthin
    • dgroux
    • sweetlikepete