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

metalsmith-debug-ui

v0.3.2

Published

A metalsmith plugin for retrieving data from the cloudinary api.

Downloads

115

Readme

metalsmith-debug-ui

nodei.co

npm github-issues stars forks

Browser based debug interface for metalsmith

Provides nice ui to navigate metalsmith files and metadata, allowing you to view any stage of the build process

Features:

  • nice ui for exploring files & metadata
  • can jump forwards and backwards through the build process
  • cool react based client

files interface

See the annotated source or github repo

install

npm i --save metalsmith-debug-ui

usage

metalsmith-debug-ui clones your metalsmith files and metadata strutures at different times during the build process and stores this history. Then it injects a browser based client into your build output which allows you to view that history.

patch mode

This will report after every plugin. You need to patch your metalsmith instance.

import Metalsmith from 'metalsmith'
import { patch } from 'metalsmith-debug-ui'

let ms = Metalsmith('src')

patch(ms)

ms
.use(...)
.build(...)

report mode

Just call report as a plugin

import Metalsmith from 'metalsmith'
import { report } from 'metalsmith-debug-ui'

let ms = Metalsmith('src') // no need to patch

ms
.use(myFirstPlugin({...}))
.use(mySecondPlugin({...}))
.use(report('stage 1'))
.use(myFirstPlugin({...}))
.use(report('stage 2'))
.build(...)

metalsmith CLI / metalsmith.json

This plugin won't work in metalsmith CLI mode.

viewing output

The client should be built with the rest of your site, and will be located at debug-ui/index.html in your build directory. You should use your favourite static development server to view it in the same way you would view anything else in your build directory.

errors during build

When a plugin throws an error metalsmith will just die as per normal behaviour, but the data debug-ui has collected will still be written to the build dir.

The only problem is that if you're using a dev server like metalsmith-dev-server you won't be able to view the ui to see what went wrong. I recommend implementing browser-sync or something instead.

anonymous plugins

It's difficult to reliably detect the names of plugins in order to report them in the ui. debug-ui first tries to sniff the plugin name from a stack trace, if that fails it checks whether the plugin returns a named function, and if that fails it will simply list the plugin as anonymous.

In most cases this is satisfactory. If something is reported as anonymous you can easily work out what it is by looking at the plugins before and after it.

demo

see metalsmith-all-the-things for a full working demo.

options

nil

plugin compatibility

Some plugins may not write to the debug-ui log, although I haven't found any yet. In theory any plugins using debug v2.x.x should work. If you find one please post an issue.

testing

nil.

building

Deprecation warning re: parseQuery is from upstream package. Don't worry about it.

npm run watch

Author

Levi Wheatcroft [email protected]

Contributing

Contributions welcome; Please submit all pull requests against the master branch.

License

MIT : http://opensource.org/licenses/MIT