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

@slidewright/vite

v0.1.4

Published

Vite plugin that serves and builds a Markdown deck as a presentation.

Readme

@slidewright/vite

A Vite plugin that turns a Markdown deck into a presentation. The plugin provides the page, so a project needs only the deck: no index.html and no React code.

  • vite serves the deck. Edits to the deck update the open page in place, on the same slide and step.
  • vite build writes a static site that works from any folder of any host.

The deck format is documented in the deck syntax reference.

Usage

npm install --save-dev vite @slidewright/vite
// vite.config.ts
import { defineConfig } from "vite";
import { slidewright } from "@slidewright/vite";

export default defineConfig({
  plugins: [slidewright({ deck: "slides.md", css: "style.css" })],
});

Then run vite to present, and vite build to build. The page renders the deck with @slidewright/react, keeps the position in the URL hash and listens to the keyboard anywhere on the page.

Requires Vite 8.

Problems in the deck

The plugin prints problems in the deck as warnings, with the file and line: invalid frontmatter, unknown layouts, and highlight ranges that code blocks skip. It prints them when Vite starts and again when a saved change gives different problems. The deck still renders, and the build still succeeds.

slides.md:9: warning: Unknown layout "two-columns": the slide shows with the default layout. The layouts are default, center, …

Options

| Option | Default | Description | | ------ | ----------- | ----------------------------------------------------------------------------------------------------------- | | deck | slides.md | The deck file, relative to the Vite root. | | css | | One or more stylesheets loaded after the default theme, relative to the Vite root. See Styling. |

The type of the options is SlidewrightOptions.

Styling

Stylesheets in css load after the default theme, so they can set theme properties and style slide content with ordinary selectors:

/* style.css */
[data-deck] {
  --deck-accent: #e11d48;
  --deck-font-sans: "Inter", sans-serif;
}

[data-slide] h1 {
  letter-spacing: -0.02em;
}

The theme properties and selectors are listed in the @slidewright/react README.

Printing

Add ?print to the address of the deck to see every slide at full size, one after the other. Print the page, or save it as a PDF, from the browser: each slide gets its own page, sized to the slide. ?print=steps gives each step its own page.

To export a PDF or PNG files from the command line, use slidewright export.

Files

Refer to images and other files from the deck with a path from the Vite root:

![Architecture](images/architecture.png)

The dev server serves them, and the build copies each file that the deck refers to into the site, at the same path. The build finds them in Markdown images and links, in the src, poster and href attributes of HTML, in the attributes of directives, and in the image of a slide.

Files in the project's public folder go to the root of the site as they are, as in any Vite project. Refer to them by name: ![Logo](logo.svg) shows public/logo.svg.

The plugin sets Vite's base to ./ when the config doesn't set it, so the built site works from any folder, such as https://user.github.io/talk/. A path that starts with / points to the root of the host, so it breaks when the site is in a folder.

The plugin replaces any index.html in the project with its own page.