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

@honeybook/hbui-scan

v2.2.0

Published

Analyzes React codebases to track @honeybook/hbui component usage with complete location tracking and CSS override analysis

Downloads

335

Readme

hbui-scan

CLI tool that scans React codebases for @honeybook/hbui component usage, styled overrides, and CSS patterns. Provides detailed location tracking and component-centric analysis for design system improvement.

Installation

npm install -g @honeybook/hbui-scan

Usage

hbui-scan <path> [options]

# Scan a directory
hbui-scan ./src

# Scan honeybook-react
hbui-scan /path/to/honeybook-react/src

# Custom output directory
hbui-scan /path/to/honeybook-react/src --output=~/my-scan/

# Output JSON to stdout (for piping/scripting)
hbui-scan /path/to/honeybook-react/src --json

# Disable default ignore patterns
hbui-scan ./src --no-ignore

# Or use npx without installing
npx @honeybook/hbui-scan ./src

Output Structure

.hbui-scans/hbui-report-{timestamp}/
├── scan-info.json          # Scan metadata and statistics
├── css-analysis.json       # Global CSS pattern analysis
├── components/
│   ├── index.json          # Component list with usage stats
│   ├── HBButton.json       # All HBButton data with exact locations
│   ├── HBCard.json         # All HBCard data with exact locations
│   └── ...

Component Report Example

Each component gets its own JSON file with complete usage data:

{
  "componentName": "HBButton",
  "package": "@honeybook/hbui",
  "usages": [
    {
      "filePath": "/src/pages/Settings.tsx",
      "line": 142,
      "columnPosition": 3421,
      "props": {
        "buttonTheme": "primary",
        "size": "md",
        "onClick": "(dynamic)"
      }
    },
    {
      "filePath": "/src/components/Header.tsx",
      "line": 28,
      "columnPosition": 892,
      "props": {
        "buttonTheme": "secondary",
        "disabled": true
      }
    }
  ],
  "styledOverrides": [
    {
      "filePath": "/src/components/CustomButton.tsx",
      "line": 5,
      "variableName": "StyledPrimaryButton",
      "originalComponent": "HBButton",
      "cssProperties": ["padding", "background-color", "border-radius"],
      "cssText": "padding: 12px 24px;\n  background-color: #007aff;\n  border-radius: 6px;"
    }
  ]
}

Development

Built with TypeScript. Uses ts-morph for AST parsing, css-tree for CSS analysis.

Requires Node.js 20+

# Install dependencies
npm install

# Run locally during development (without building)
npm run scan -- ./fixtures

# Build the project
npm run build

# Run quality checks
npm run lint
npm run format:check
npm run type-check
npm test