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

@kadal/prettier-plugin

v0.12.0

Published

Prettier for Kadal Deck decks (deck.mdx): separators and frontmatter normalised, YAML formatted with its comments, and every slide's Markdown formatted, with code, notes, magic-move and ::slot:: sugar left exactly as written.

Readme

@kadal/prettier-plugin

Build it. Rehearse it. Own the room. Kadal Deck has your back for the whole talk, from the first idea to the last applause. This package keeps your deck.mdx tidy while you build it, in any editor that runs Prettier.

Take the tour · Docs

Prettier for Kadal Deck presentations: deck.mdx (and slides.mdx) formatted the way the engine reads them, in any editor that runs Prettier.

CLI: kadal-deck format · Docs · Source

npm install --save-dev prettier @kadal/prettier-plugin
// .prettierrc
{ "plugins": ["@kadal/prettier-plugin"] }

That is all: with the plugin loaded, a file named deck.mdx or slides.mdx is formatted as a deck. Other deck files ask for it by parser:

{
  "plugins": ["@kadal/prettier-plugin"],
  "overrides": [{ "files": ["slides/*.mdx", "talks/**/*.mdx"], "options": { "parser": "kadal-deck" } }]
}

kadal-deck format (in @kadal/deck) runs the same formatter without any setup.

What it does

  • Separators: exactly --- between slides and ---- for a slide beneath (a vertical stack), with one blank line around each. Pieces the engine skips (nothing in them) go.
  • Headmatter and frontmatter: the YAML through Prettier's YAML printer. Comments stay, keys stay in the order you wrote them, and the values are checked to be unchanged. A ```yaml block frontmatter stays a block.
  • Slide bodies: Prettier's Markdown printer (- bullets, _emphasis_, aligned tables, one blank line between blocks). Left exactly as written:
    • code fences (with their {2|3} steps, {monaco}, titles), magic-move blocks
    • <Notes> and the HTML-comment notes at the end of a slide
    • <style> blocks
    • $$ … $$ maths
    • ::right:: slot markers, ::code-group … ::, <<< @/snippet imports
    • JSX and expressions
  • A thematic break is written ***, since --- would start a new slide.

Safety

Prettier's Markdown printer reads MDX the way MDX 1 did; the engine compiles MDX 3. So every formatted slide is parsed again (CommonMark, and MDX 3 when the slide is valid MDX 3) and compared with the original as a syntax tree. A slide whose meaning would change keeps its text as written. The whole deck is then cut again and checked to have the same slides, stacked the same way, with the same frontmatter. If it does not, the formatter throws instead of writing.

A slide containing prettier-ignore is left alone.

Options

| Option | Default | | |---|---|---| | kadalDeckBodies | true | false formats the separators and the frontmatter only |

printWidth, tabWidth, useTabs, proseWrap, singleQuote, bracketSpacing and endOfLine reach the YAML and Markdown printers as usual.

API

import * as prettier from "prettier";
import { formatDeck } from "@kadal/prettier-plugin";

const { text, changed, kept } = await formatDeck(source, prettier, { proseWrap: "preserve" });
// kept: [{ slide, line, reason }] for each part left as written, and why

Licence

AGPL-3.0-or-later, like the engine (see LICENSING.md).