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

@etchteam/dash

v1.1.1

Published

A tiny HTML build tool with zero dependencies

Readme

A tiny build tool that adds layouts and frontmatter to HTML.

Installation

Dash requires Bun to run.

bun add @etchteam/dash

Or with npm:

npm install @etchteam/dash

Or copybuild.js source code into your project. The entire build tool is a single file.

Usage

Build

Build all HTML pages into the dist/ directory:

dash build

--script

Use a custom transform script to modify content during build. The script should default-export a function that receives frontmatter and content and returns the transformed content:

// transform.js
export default function transform({
  frontmatter,
  content
}) {
  // Transform content however you like, e.g. process markdown
  return processedContent;
}
dash build --script transform.js

Serve

Serve the dist/ directory as a static site. Clean URLs are supported automatically — /about will serve dist/about/index.html.

dash serve

--port

Change the port (defaults to 3000):

dash serve --port 8080

--watch

Build first, then serve and automatically rebuild when HTML pages or referenced assets (CSS, JS, images, fonts) change:

dash serve --watch

--script

Serve with a custom transform script, applied to the initial build and every rebuild:

dash serve --watch --script transform.js

Programmatic

The build function can be imported and used as part of an existing script or build pipeline:

import { build } from '@etchteam/dash';

await build({
  transform: ({ frontmatter, content }) => {
    // Transform content, e.g. process markdown
    return processedContent;
  }
});

All options are optional — calling await build() runs a standard build. Pass transform to modify content per page, or clean: false to build without wiping dist/ first.

The startServer function is also available for programmatic use:

import { startServer } from '@etchteam/dash/serve';

startServer(8080);

How it works

Layouts

Create layout files with the naming convention layout.{name}.html:

layout.default.html
layout.article.html

Inside a layout, use three-dash HTML comments as placeholders:

<!DOCTYPE html>
<html>
  <head>
    <title><!--- title ---></title>
  </head>
  <body>
    <!--- content --->
  </body>
</html>

<!--- content ---> is a special placeholder that gets replaced with the page content. All other placeholders are replaced with values from the page's frontmatter.

Pages

HTML files use a frontmatter-style comment block at the top:

<!---
title: My Page
layout: article
--->

<h1>Hello</h1>
<p>This is my page content.</p>

The layout key specifies which layout file to use. If omitted, layout.default.html is used.

Frontmatter

Three-dash HTML comments at the top of a file. Key-value pairs, one per line:

<!---
title: Hello World
description: A simple page
author: Etch
--->

These values replace matching <!--- key ---> placeholders in the layout. Because the frontmatter uses valid HTML comment syntax, your pages still work as plain HTML files in the browser.

Assets

Any local asset file like JavaScript, CSS, images or fonts referenced from a page or its layout via src or href get copied into dist/ at the same relative path it is referenced from. A shared asset is copied once per build.

Similar tools

For more complex build needs, consider: