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

@chronocide/spider

v5.4.0

Published

Tiny static site generator

Readme


spider is a tiny TypeScript static site generator (SSR) meant for small personal websites. It uses a modular plugin system for maximum flexibility.

Features

  • No dependencies
  • No templating language, uses plain JS/TS
  • Modular loaders, allowing any file type to be used
  • Flexible API, every page has full access to the whole website allowing for the creation of RSS feeds, collection pages, etc.
  • Sensible defaults
    • Markdown file URL's are generated based on folder structure and blog post title (/<folder>/<title>)
    • Creation and update dates are truncated to days
    • Output files are HTML

Installation

npm i @chronocide/spider

Usage

spider

Builds static site

import Spider from '@chronocide/spark';

const spider = new Spider({
  files: ['src/**/*.ts', 'src/**/*.md'],
  root: 'src',
  dirout: 'build',
  exclude: ['**/*.spec.ts']
});

spider.build();
import type { Template, Page } from '@chronocide/spider';

import h from '@chronocide/spark';

const template: Template = registry =>
  document => {
    const template = h('html')({ lang: 'en-GB' })(
      h('head')()(h('title')()()),
      h('body')()(document.body(registry))
    );

    return `<!DOCTYPE html>${template}`;
  };

const page: Page = {
  title: 'Home',
  url: '/',
  template,
  body: registry => h('main')()(
    h('p')()('This is a page'),
    h('a')({ href: registry.node('/about')?.url })(registry.node('/about')?.title)
  )
};

export default page;
SpiderOptions
export type PageOptions = {
  title: string;
  description: string | null;
  url: string;
  ext: string | null;
  created: Date;
  updated: Date | null;
  template: Template | null;
  body: Body | null;
};
export type Loader = (root: string) => (file: string) => Promise<PageOptions>;
type SpiderOptions = {
  files: string[];
  exclude?: string[];
  root?: string;
  dirout?: string;
  loader?: Record<string, Loader>;
}
  • files, entry files. Supports Node's glob pattern.
  • exclude, entry file filter. Supports Node's glob pattern.
  • root, base directory relative to files.
  • dirout, output directory. If empty, does not write files.
  • loader, file loaders.

Loaders

Loaders are used to load different file types. By default, spider supports loading .js, .ts and .md files. Loaders can be created or overwritten.

import type { Loader } from '@chronocide/spider';

import Spider from '@chronocide/spider';

const loader: Loader = async context => ({
  title: 'loader',
  description: null,
  url: '/',
  ext: '.html',
  created: new Date(),
  updated: null,
  template: registry => document => document.body(registry),
  body: registry => `<a href="${registry.node('/').title}">Home</a>`
});

const spider = new Spider({
  files: ['src/**/*.ts', 'src/**/*.md'],
  root: 'src',
  dirout: 'build',
  exclude: ['**/*.spec.ts'],
  loader: {
    '.md': loader,
    '.ts': loader
  }
});

spider.build();