Socket
Socket
Sign inDemoInstall

cleanup-svg-icons

Package Overview
Dependencies
124
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    cleanup-svg-icons

Clean up SVGs to be actually usable as icons


Version published
Maintainers
1
Install size
10.5 MB
Created

Readme

Source

cleanup-svg-icons

Build Status Coverage Status Greenkeeper badge

Clean up SVGs to be actually usable as icons

Install

npm install -g cleanup-svg-icons

Usage

:warning: This modifies files in-place, please use version control or make a backup.

cleanup-svg-icons "/the/path/to/a/folder/or/any/glob/*.svg"

Internals

  • Optimize the SVG (merge paths, etc.)
  • Remove elements that are useless (e.g. <title>)
  • Remove attributes that are useless (e.g. id, data-*)
  • Make sure that class names are not colliding (e.g. AI always exports with cls-1, cls-2, etc.)
  • Replace hardcoded colors with currentColor so the parent can be used for styling
  • Make sure that fill: none is working when fill: currentColor is on the parent

FAQs

Last updated on 03 Feb 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc