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

@dearstudio/webpub

v0.1.70

Published

website builder

Readme

webpub

A small and pragmatic website builder

PRERELEASE

Design

Use few, well supported dependencies. We want resilience.

Focus on doing things right - in a pragmatic sense. We want transparency.

Usage

This repository contains the tool itself, and a (work-in-progress) default/test content directory + rendering template.

Please consult the webpub-starter repo and follow the User documentation there.


Developer documentation

Requirements

  • node.js with npm, version: 22.14+
  • Only tested on macOS

Cli

The primary use of this tool is to install it as a dev-dependency in a node/npm project containing your content directory and a rendering template.

The package provdes the webpub "bin" field, so consuming projects can invoke it via their package.json scripts section:

// package.json

"scripts": {
  "dev": "webpub dev", // starts a dev-server in watch-mode
  "build": "webpub"    // just run the build
},

Core

During development, the main entry point is src/index.ts.

bun src/index.ts
// or
ts-node src/index.ts

The core features are

  • Collect and resolve config, from the user-provided webpub.config.js and package.json files, and merge them with defaults.

  • Scan the user-provided content directory, indexing each index.md file and replicating the directory structure of the content directory in the dist (or value of the config.output-directory).

  • Pass Page data through the templates and plugins, precomputing the Page Tree (that represents children of the current page) and Page Type (indicating if the current Page is a "list" or "detail" page) on the go

  • Write template output to index.html pages

  • (optionally) run a simple dev-server (on a configurable port, default 3000)

  • (optionally) watch the content and template directories for changes, run rebuild and hot-reload the dev-server served pages when a change is detected

Templates

A template (please check src/types.ts#Template for the Type) simply exports a render function and will receive current WebpubConfig and Page data for each index.md file found in the content directory.

Its then up to the template to render some HTML to structure that data, and return a full HTML page.

Plugins

Webpub plugins can respond to various hooks in the re-build process.

Currently there is only two plugins available:

  • webpub-plugin-img: That creates a (resized) copy of all images used in a page

  • webpub-plugin-srcset: That creates a range of resized copies of all images used in a page and adds a .srcset attribute to the img-tags on each page

More is planned.