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

sprite-tools

v0.0.4

Published

CLI tool to generate sprite sheets from a directory of images

Readme

Sprite Generator CLI 🖼️

一个强大的命令行工具,用于将多个图片自动组合成精灵图,并生成对应的位置信息 JSON 文件。

一. 功能特性 ✨

自动布局:智能计算最优宫格布局(1x1, 2x2, 3x3...)

多格式支持:支持 PNG、JPG、WebP、GIF 等多种图片格式

实时进度:显示处理进度和详细日志

元数据输出:生成包含每张图片精确位置信息的 JSON 文件

灵活配置:可调整间距、最大尺寸等参数

美观输出:彩色控制台输出,增强可读性

二. 安装 📦

npm install sprite-tools -g

三. 使用说明 🚀

基本用法

sprite -i ./images -o ./output

完整选项

sprite
-i ./images     # 输入目录(必须)
-o ./sprites    # 输出目录(默认: ./output)
-n my-sprite    # 输出文件名(默认: sprite)
-p 10           # 图片间距(默认: 0)
-m 2048         # 最大尺寸限制(默认: 4096)

查看帮助

sprite -h

四. 输出文件 📄

工具会生成两个文件:

[name].png - 合成的精灵图

[name].json - 包含每张图片位置信息的元数据

JSON 格式示例:

{
  "spriteWidth": 1024,
  "spriteHeight": 1024,
  "gridSize": 3,
  "imageCount": 7,
  "images": {
    "icon1.png": {
      "x": 0,
      "y": 0,
      "width": 300,
      "height": 200
    },
    "icon2.jpg": {
      "x": 300,
      "y": 0,
      "width": 250,
      "height": 400
    }
  }
}