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

pugneum-filter-prismjs

v1.1.1

Published

Pugneum prismjs filter

Readme

pugneum-filter-prismjs

Syntax highlighting in pugneum templates with prismjs.

Installation

npm install pugneum-filter-prismjs

Usage

Pugneum filters are applied with a leading colon (:filtername):

link(rel="stylesheet", href="/styles/prism-theme.css")
pre.language-scheme
  code.language-scheme
    :prismjs(language=scheme)
      (define (square x) (* x x))

The filter body is highlighted as text — pugneum never executes it.

Output and styling

The filter returns a token-markup fragment only. It does not emit pre or code, add a language class, or bundle a Prism theme. Wrap the filter as shown above, serve a Prism-compatible stylesheet yourself, and apply matching language-<name> classes to the wrapper and code element. Those classes are the styling contract; the adapter's fragment contains only Prism's token ... spans.

Attributes

  • language — the Prism language name (e.g. scheme, javascript). When supplied, it must be a nonempty known language string. Unknown and malformed values are hard PUGNEUM:INVALID_HIGHLIGHT_OPTION errors. When omitted, the body is HTML-escaped and emitted without token markup (no auto-detection and no Prism grammar bundle initialization).

Unknown attributes use the same coded error instead of silently selecting the escape-only path.

Prism components

This adapter uses prism-minmaxed, a server-only Prism fork maintained by Pugneum's author. It removes browser code and optional project files while putting every supported language and its dependencies in one zero-dependency package. The bundle is loaded lazily only when a language is explicitly selected; escape-only filtering does not load Prism.

The fork currently incorporates the server-relevant code and grammars from Prism 1.29. Prism 1.30 changed browser-only core code, so there is no applicable server update to carry yet. When Prism v2 is released, review its server-side changes and give the new version the same minmaxing treatment before updating this dependency. The tests exercise aliases, bundled dependencies, unknown names, token output, and the escape-only no-load boundary.

License

MIT