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

@papit/svg-spritesheet

v0.0.3

Published

Command-line tool that merges a folder of SVG files into one SVG spritesheet, with one symbol per file named after its title or filename.

Readme

@papit/svg-spritesheet

Command-line tool that merges a folder of SVG files into one SVG spritesheet, with one symbol per file named after its title or filename.

Logo


Type Tests NPM version


Installation

npm install -D @papit/svg-spritesheet

Usage

npx @papit/svg-spritesheet --input ./icons --output ./asset/icons/spritesheet.svg --name-query title

Given icons/check.svg and icons/arrow-left.svg:

<!-- icons/check.svg -->
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><title>check</title><path d="…"/></svg>
<!-- icons/arrow-left.svg -->
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="…"/></svg>

the spritesheet holds one symbol per file:

<svg xmlns="http://www.w3.org/2000/svg">
    <symbol id="arrow-left" viewBox="0 0 16 16"><path d="…"></path></symbol>
    <symbol id="check" viewBox="0 0 24 24"><title>check</title><path d="…"></path></symbol>
</svg>

Reference an icon by its id:

<svg><use href="/icons/spritesheet.svg#check"></use></svg>

CLI flags

| Flag | Default | Description | | --- | --- | --- | | --input | current folder | folder with the .svg files (not recursive) | | --output | <input>/spritesheet.svg | file to write, folders are created | | --name-query | title | selector whose text becomes the symbol id | | --info | - | print progress per file |

How files are merged

  • Each root <svg> becomes a symbol. Its attributes (like viewBox) are copied over, except xmlns.
  • The id is the text of the first --name-query match, falling back to the filename without .svg.
  • A file that can't be parsed is skipped with a warning.
  • An existing output file is replaced.

License

Licensed under the @Papit License 1.0 Copyright (c) 2024 Henry Pap (@onkelhoy)

Key points

  • ✅ Free to use in commercial projects
  • ✅ Free to modify and distribute
  • ✅ Attribution required
  • ❌ Cannot resell the component itself as a standalone product

See the LICENSE file for full details.

Related