svgclean
Removes useless tags from exported svg files.
Last updated 6 years ago by hiroagustin .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install svgclean 
SYNC missed versions from official npm registry.

SVGclean

Cleans up exported svg files by:

  1. Removing useless tags and attributes.
  2. Creates CSS class names based on fill attributes.

Install

From NPM for use as a command line app:

npm install svgclean -g

From NPM for programmatic use:

npm install --save svgclean

Usage

From the terminal

svgclean image.svg

or

svgclean image.svg image-clean.svg

As a Node.js module

var svgclean = require('svgclean');

// Modify existing file
svgclean('image-1.svg');

// Create new file
svgclean('image-2.svg', 'image-2-clean.svg');

// Passing a callback
svgclean('image-3.svg', function ()
{
  // Cleaning is done
});

svgclean('image-4.svg', 'image-4-clean.svg', function ()
{
  // Cleaning is done
});

License and copyrights

This software is released under the terms of the MIT license.


Inspired on (and works better with) SVGO.

Current Tags

  • 0.2.9                                ...           latest (6 years ago)

14 Versions

  • 0.2.9                                ...           6 years ago
  • 0.2.8                                ...           6 years ago
  • 0.2.7                                ...           6 years ago
  • 0.2.6                                ...           6 years ago
  • 0.2.5                                ...           6 years ago
  • 0.2.4                                ...           6 years ago
  • 0.2.3                                ...           6 years ago
  • 0.2.2                                ...           6 years ago
  • 0.2.1                                ...           6 years ago
  • 0.2.0                                ...           6 years ago
  • 0.1.3                                ...           6 years ago
  • 0.1.2                                ...           6 years ago
  • 0.1.1                                ...           6 years ago
  • 0.1.0                                ...           6 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 14
Dependencies (4)
Dev Dependencies (0)
None
Dependents (1)

Copyright 2014 - 2016 © taobao.org |