task-svgo

0.1.0 • Public • Published

task-svgo

Minify SVG files with svgo.

The "svgo" task

Usage Examples

var svgo = new (require('task-svgo'))
svgo.run(inputs, options, logger)

Options

To disable/enable plugins, look for the plugin name at the SVGO repository and copy the plugin name (minus the file extension). Then set its value in the JSON to false in comma-separated objects. To exemplify, here is how the plugins section in the example configuration (illustrated above) might be written with some of the standard SVGO plugins disabled:

plugins: [
	{ removeViewBox: false }, 				// don't remove the viewbox atribute from the SVG
	{ removeUselessStrokeAndFill: false },	// don't remove Useless Strokes and Fills
	{ removeEmptyAttrs: false }				// don't remove Empty Attributes from the SVG
]

Release History

  • 2014-07-13 0.1.0 Initial release.

License

Copyright (c) 2014 Yuanyan Cao. Licensed under the MIT license.

/task-svgo/

    Package Sidebar

    Install

    npm i task-svgo

    Weekly Downloads

    0

    Version

    0.1.0

    License

    none

    Last publish

    Collaborators

    • yuanyan