npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@massimo-cassandro/svg-icons-tools

v1.3.0

Published

Optimize svg iocns (with SVGO) and generate SVG symbols file, JSX etc.

Downloads

9

Readme

Svg Icons Tools

Svg Icons Tools provides some utilities for manage and optimize SVG icons:

  • optimize all files with SVGO
  • combine svg files into a single file, where each icon is wrapped within a <symbol> element (inspired from svgstore)
  • convert svg files to JSX
  • copy optimized svg files to target directory
  • removes pallets from the icon markups (see config file for more details).
  • create a scss file with svg icons converted to sass variables
  • jsx and optimized icons only: ability to manage both icons with fill and stroke adding optional classes to apply different css properties

These tools are pretty useless if you download your icons from one of the libraries you can find on the web, but if you design them yourself, svg-icons-tools can save you a lot of time in cleaning up and optimizing icons drawn with Illustrator, Figma, Sketch etc.

Also, most (or all) libraries only allow you to download icons with a fixed thickness, but you can often download "working" versions where thickness is defined by the stroke attribute. In these cases there is often a pallet that you can easily remove.

Read more in my Building an Icon System in React article.

Installation

npm i -D @massimo-cassandro/svg-icons-tools

Setup

First, create a config file for you project, you can run:

npx iconsTools init

This creates a svg-icons-tools directory which contains the svg-icons-tools.config.mjs configuration file.

Rename the folder as you like and move it where you need. Then open and customize the svg-icons-tools.config.mjs file.

Run

To launch the script, open your terminal and use the command:

npx iconsTools --config ./path/to/svg-icons-tools.config.mjs

where --config must contain the path, relative to the current dir, to the config file.

If the --config parameter is not set, the script will look for the configuration file in the current directory; if the file is not found, an error will be thrown.

Configuration details

See src/default-config.mjs for more info.

Demo

See demo/readme.

TODO

  • documentation to jsdoc
  • prettify the jsx output (update docs)
  • SVG attributes to jsx (upd doc)
  • option to clean-up dest folder for jsx and optimized (?)
  • auto changelog

Changelog / Breaking Changes

1.1

  • added default jsx icon builder function

Breaking Changes

  • in config file, config.jsx.icon_builder becomes config.jsx.custom_icon_builder, if not defined the default icon builder is used for jsx files.

1.0

  • First production release