JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 17861
  • Score
    100M100P100Q143786F
  • License MIT

Minify SVG

Package Exports

  • grunt-svgmin/tasks/svgmin
  • grunt-svgmin/tasks/svgmin.js

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 (grunt-svgmin) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

grunt-svgmin

Minify SVG using SVGO

Issues with the output should be reported on the SVGO issue tracker.

Install

npm install --save-dev grunt-svgmin

Usage

require('load-grunt-tasks')(grunt);

grunt.initConfig({
    svgmin: {
        options: {
            plugins: [
                {
                    name: 'preset-default',
                    params: {
                        overrides: {
                            sortAttrs: false
                        }
                    }
                }
            ]
        },
        dist: {
            files: {
                'dist/unicorn.svg': 'app/unicorn.svg'
            }
        }
    }
});

grunt.registerTask('default', ['svgmin']);

Options

The provided options are passed directly to SVGO.

Note

Per-file savings are only printed in verbose mode (grunt svgmin --verbose).