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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@oviirup/sprite

v0.1.2

Published

Create svg sprite sheet from SVG files, with ease

Downloads

237

Readme

Sprite

publish version

Simple tool to create SVG sprite sheet from SVG icons

[!NOTE] This project is still in active development.

Getting started

Installation

The installation process is pretty much the same as another library, whether you use npm, pnpm, yarn, or bun.

npm i @oviirup/sprite -D

It will install the package with binary sprite

Setup a sprite project

You can initiate a simple project with init command,

npm sprite init

You can also manually create a entry file with .yaml REF as follows ...

# icons.yaml
name: lucide-icons
output: icons.sprite.svg
icons:
  - name: 'home',
    content: <path d="M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8"/><path d="M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"/>,
    attributes:
      viewBox: 0 0 24 24
      fill: none
      stroke: currentcolor
      stroke-linecap: round
      stroke-linejoin: round
      stroke-width: 2

And you are all ready to go. Now while you are building you can reference the file.

You can also set the entry points in package.json REF as follows...

// package.json
{
  "sprite": {
    "cwd": "src",
    "entries": ["icons.yaml"]
  }
}

Learn more about configuration.

Usage

If you installed it use ...

npm sprite build icons.yaml

The CLI can pickup configuration from package.json, so you don't need to use any entry point in the CLI. Any entry point defined in the CLI will overwrite the config.

npm sprite build

Or, you can directly use the CLI without installing with npx

npx @oviirup/sprite build icons.yaml

Configuration

You can define the root configuration in package.json with an object of sprite.

Sprite base config

  • entries: String | String[] *
    Entries for sprite record (path or glob pattern, relative to cwd)
  • watch: Boolean
    Enable watch mode
  • cwd: String
    Working directory (default: process.cwd())

Sprite record config

  • name: String *
    Name of the sprite project
  • output: String *
    Output file without extension, relative to cwd
  • prefix: String
    Prefix for icon names, with no empty space
  • icons: Icon[] *
    Icon sets configuration

Icon config

  • name: String *
    Name of the icon, (should be in lowercase)
  • content: String *
    Inner content of the svg icon
  • attributes: Record<string, string>
    SVG attributes
  • tags: String[]
    Tags for the icon for search

Contributing & Development

You are welcome to contribute to the project. Please follow the contributing guidelines before making any contribution.

  • Fork & clone to local machine
    Fork the repo from GitHub by clicking the fork button at the top-right and clone it...

    git clone https://github.com/username/sprite.git
  • Create a new branch
    Please make sure you are not on the main branch before making any changes.

    git checkout -b my-new-branch
  • Install dependencies
    This project uses bun.js, although any other package manager can be used as well.

    bun install