JSPM

  • Created
  • Published
  • Downloads 606932
  • Score
    100M100P100Q190004F
  • License MIT

SVGO imagemin plugin

Package Exports

  • imagemin-svgo

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (imagemin-svgo) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

imagemin-svgo Build Status Build status

SVGO imagemin plugin

Install

$ npm install imagemin-svgo

Usage

const imagemin = require('imagemin');
const imageminSvgo = require('imagemin-svgo');

(async () => {
    await imagemin(['images/*.svg'], 'build/images', {
        use: [
            imageminSvgo({
                plugins: [
                    {removeViewBox: false}
                ]
            })
        ]
    });

    console.log('Images optimized');
})();

API

imageminSvgo([options])(buffer)

Returns a Promise<Buffer>.

options

Type: Object

Pass options to SVGO.

buffer

Type: Buffer

Buffer to optimize.

License

MIT © imagemin